+ Reply to Thread
Results 1 to 6 of 6

Macro to Loop Print 1 Template multiple times

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Macro to Loop Print 1 Template multiple times

    Hello; I have a model I've been working on that creates invoices for the same product but to multiple customers (the loop part) each month. I have three exhibit tabs that need to be printed. Two of then (say tab 2 and tab 3) just once (they are summaries) and the other (tab 1) needs to "loop" print once for each customer.

    I'm hoping to create a macro that updates cell F12 in tab 1 with each customer's identification number, prints it, and moves to the next customer. I have all the customer's look-up information in tab 4, so I was hoping there to be a command prompt for the user to even print 1 customer's invoice by selecting from a drop-down box in the command prompt, or to "select all" to print.

    I know enough VBA to be dangerous and edit other people's codes, but I haven't been able to find this scenario anywhere and wouldn't know where to begin if I were to start from scratch.

    I appreciate anyone's willingness to take a stab at this. Thanks in advance for your help!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Loop Print 1 Template multiple times

    Hello run2win17,

    Where is the list of customer IDs located?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-27-2011
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro to Loop Print 1 Template multiple times

    Hi Leith,

    Let's say tab 4, cells A1:A20 - thanks!

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Loop Print 1 Template multiple times

    Hello run2win17,

    Is there any more information from tab 4 that needs to transferred to tab 1 ? If so then you should post your workbook.

  5. #5
    Registered User
    Join Date
    01-27-2011
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro to Loop Print 1 Template multiple times

    Hello - the actual model I've compiled is too large to attach, so I've pared it down in the attachment. The highlighted cell (F12) in Exhibit - 065-066-067 is what needs to change for each customer and that exhibit is the one that needs to loop-print multiple times (if print all selected) or print once if one specific customer is chosen. Exhibit Composite Invoice is the second exhibit that needs to print (but only once) and includes the customer ID # look-up (column B); Finally exhibit - Boces II invoice also needs to print once.

    There are other sheets in the actual model that will adjust the first exhibit depending on what is chosen in F12.

    Thanks for your help!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-27-2011
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro to Loop Print 1 Template multiple times

    Also, in between printing of each customer's exhibit it would need to run a macro I already have in it that hides/unhides unnecessary rows on the invoice... I forgot about that detail, let me know if you need more information on that though. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1