+ Reply to Thread
Results 1 to 6 of 6

VBA code to print 60+ items (60+ pages)

  1. #1
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    VBA code to print 60+ items (60+ pages)

    Please see attached excel file (Excel 07 & Adobe 7 Standard)

    I want to update:
    (1) cells A2 and B20:C22 of tab "Template" (highlighted yellow)
    (2) with cells A1 and B2:D2 of "Data" tab for each item,
    (3) then print "Template" to pdf.

    Repeat (1) thru (3) 60+ times, going down the list

    I've been doing this manually 60+ times. I wish to have a macro to update and print automatically.

    Can you help me with some pointers or even recommend a better formula for this?

    Thanks so much!!
    Attached Files Attached Files
    Last edited by NBVC; 12-13-2010 at 01:47 PM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: VBA code to print 60+ items (60+ pages)

    Don't know about printing "Template" to PDF file as I have no access to Excel 2007 but I've put thogether part of a macro for you.

    Please Login or Register  to view this content.
    This macro loops through all the cells in the range "Investor" and updates the values in
    A2, B20, B21 and B22 with values from sheet "Data" going from "Fund 1" to "Fund 67" since this was the last value in the range "Investor" in your example file.

    HTH

    Alf
    Last edited by Alf; 12-12-2010 at 05:46 AM. Reason: Spelling

  3. #3
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    Re: VBA code to print 60+ items (60+ pages)

    Thanks so much for your help!! The macro works perfectly and i was able to record a print macro to PDF.

    Much appreciated for your help!

    edit to ask: how do you mark this as "SOLVED"?


    Quote Originally Posted by Alf View Post
    Don't know about printing "Template" to PDF file as I have no access to Excel 2007 but I've put thogether part of a macro for you.

    Please Login or Register  to view this content.
    This macro loops through all the cells in the range "Investor" and updates the values in
    A2, B20, B21 and B22 with values from sheet "Data" going from "Fund 1" to "Fund 67" since this was the last value in the range "Investor" in your example file.

    HTH

    Alf
    Last edited by tn80; 12-12-2010 at 09:10 PM.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: VBA code to print 60+ items (60+ pages)

    Glad to be of help. Just to still my curiousity could you please post you print macro as I'm eager to learn.

    edit to ask: how do you mark this as "SOLVED"?
    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  5. #5
    Registered User
    Join Date
    04-07-2008
    Posts
    30

    Re: VBA code to print 60+ items (60+ pages)

    Quote Originally Posted by Alf View Post
    Glad to be of help. Just to still my curiousity could you please post you print macro as I'm eager to learn.
    Please see the code below. Hope you can see it, I tried to make it a different color but the color doesn't show up. It's where you told me to put the print macro in. You can also specify where to have the PDFs saved.

    Please Login or Register  to view this content.
    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.
    Thanks for the info, I'll contact a moderator to have this marked as solved.

    Thanks again!

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: VBA code to print 60+ items (60+ pages)

    Thanks for the "PDF print part". Good to know.

    Regards

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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