Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:46:56+00:00 2026-06-14T13:46:56+00:00

Update to code & question: The current code in the module for this sheet

  • 0

Update to code & question:
The current code in the module for this sheet is as follows:

Private Sub Worksheet_Change(ByVal Target As Range)
     If Not Intersect(Target, Range("B2:B2")) Is Nothing Then
          Application.Run "MonthlyRead"
     End If
End Sub

Sub MPrintAll()
     Dim c As String
     Dim MonthlyList As Range
     Set MonthlyList = Worksheets("Monthly").Range("MonthlyList").Cells
     For Each cell In MonthlyList
         Range("b2").Value = cell.Value
         ActiveWorkbook.Worksheets("Monthly").PrintOut
     Next cell
End Sub

I’ve been stepping through the code, to try to identify where the problems occur. When I press F8 after “Range(“b2″).Value = cell.Value” it immediately goes to the first line of code for the sheet, completely skipping the Print command. Also, it deletes the first value in the named range, instead of copy-pasting it to cell B2.

For reference, here’s the code in Module1 called by the first routine above:

    Sub MonthlyRead()
         Call MEFTPS
         Call MUCT6
    End Sub
    Sub MEFTPS()
         If Range("a2").Value = "EFTPS Package" Then
              Call MShow
              Else: Call MHide
         End If
    End Sub
    Sub MHide()
        Rows("20:20").Select
        Selection.EntireRow.Hidden = True
        Rows("31:31").Select
        Selection.EntireRow.Hidden = True
        Rows("42:42").Select
        Selection.EntireRow.Hidden = True
        Rows("53:53").Select
        Selection.EntireRow.Hidden = True
        Range("B2").Select
    End Sub
    Sub MShow()
        Rows("20:20").Select
        Selection.EntireRow.Hidden = False
        Rows("31:31").Select
        Selection.EntireRow.Hidden = False
        Rows("42:42").Select
        Selection.EntireRow.Hidden = False
        Rows("53:53").Select
        Selection.EntireRow.Hidden = False
        Range("B2").Select
    End Sub
    Sub MUCT6()
        If Range("g3").Value = "Y" Then
             Call UCT6MShow
             Else: Call UCT6MHide
        End If
    End Sub
    Sub UCT6MHide()
        Rows("19:19").Select
        Selection.EntireRow.Hidden = True
        Rows("30:30").Select
        Selection.EntireRow.Hidden = True
        Rows("41:41").Select
        Selection.EntireRow.Hidden = True
        Rows("52:52").Select
        Selection.EntireRow.Hidden = True
        Range("B2").Select
    End Sub
    Sub UCT6MShow()
        Rows("19:19").Select
        Selection.EntireRow.Hidden = False
        Rows("30:30").Select
        Selection.EntireRow.Hidden = False
        Rows("41:41").Select
        Selection.EntireRow.Hidden = False
        Rows("52:52").Select
        Selection.EntireRow.Hidden = False
        Range("B2").Select
    End Sub

I’m working with a dynamic worksheet that populates an individualized payment schedule, based on a selection from a data validation drop-list at the top of the page. There are approximately 300 options in the drop-list. These schedules are then printed, to verify information obtained from 2 other programs, all of which must be printed, copied, scanned, packed, and mailed in a single day.

I’m looking for VBA code that can select each client name from the drop-list in order, from the beginning to the end of the list. The list is populated from a named range on another sheet, named “QtrlyList.”

I have some very simple code, that doesn’t work.

    Sub PrintAll()
        For Each cell In QtrlyList
            Worksheets("Normal").PrintOut
        Next cell
    End Sub

Whenever I try to run the code, I get a “Type Mismatch” error. I’m fairly certain this is coming from “cell” or “QtrlyList.” I’m just not sure how to fix it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:46:58+00:00Added an answer on June 14, 2026 at 1:46 pm

    Something like this might work for you (untested)

    Sub PrintAll()
    
        Dim wb as Workbook, cell as Range
    
        Set Wb = ActiveWorkbook 'or ThisWorkBook if the code is in your reporting workbook 
    
        For Each cell In wb.Sheets("SheetNameHere").Range("QtrlyList").Cells
            With wb.Worksheets("Normal")
                'you want to set the value of whichever cell has the drop-down
               .Range("D2")).value=cell.Value
               DoEvents 'allow sheet to pick up changed value
               .PrintOut
            End with
        Next cell
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update code via Linq, but I am getting this error:
Update the question Hello All, I would like improve my email address validation code.
Duplicate of this question . update - This is not an exact duplicate. See
Yet another PHP date question for everyone - I have the current code for
EDIT : This question duplicates How to access the current Subversion build number? (Thanks
offset=ftell(ptr)-sizeof(student1); fseek(ptr,offset,SEEK_SET); fwrite(&student1,sizeof(student1),1,ptr); This C code means move the pointer from the current position
I am using following steps to update code on server after login to server:
suppose you update your code to revision 10 which is broken. You want to
I'm trying to update my code to use cv2.SURF() as opposed to cv2.FeatureDetector_create(SURF) and
I have the following code: UPDATE myTable SET Col1 = @Value However, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.