+ Reply to Thread
Results 1 to 5 of 5

Print multiple pages based on cell value to pdf

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    adelaide
    MS-Off Ver
    Excel 2003
    Posts
    86

    Print multiple pages based on cell value to pdf

    I am looking for a code that will print multiple sheets and combine into pdf based on a cell values on "header" page.

    The name of the combined pdf should be what is in cell a1 on 'HEADERPAGE" eg:
    random stuff pricing today.PDF

    there should be no location set as this will change so a 'Saveas' type option is best.
    hope this makes sense.

    Please see attached file
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,971

    Re: Print multiple pages based on cell value to pdf

    Your labels are irregularly spaced from the count boxes, which complicates matters. I moved them so they would all be the same.

    Also the labels must exactly match the sheet names so I renamed sheet Apple to Apples.

    there should be no location set as this will change so a 'Saveas' type option is best.
    I have no idea what you mean by this. There is no SaveAs option in VBA for exporting PDF files.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    adelaide
    MS-Off Ver
    Excel 2003
    Posts
    86

    Thumbs up Re: Print multiple pages based on cell value to pdf

    Wow! thank you 6StringJazzer that is spot on

  4. #4
    Registered User
    Join Date
    07-01-2010
    Location
    adelaide
    MS-Off Ver
    Excel 2003
    Posts
    86

    Angry Re: Print multiple pages based on cell value to pdf

    oh no it has stopped working now that i have added sheets.

    please can you advise on what's wrong here?

    i am so lost.
    Last edited by lpratt; 10-31-2021 at 06:18 PM.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,971

    Re: Print multiple pages based on cell value to pdf

    Here is what I said:

    Your labels are irregularly spaced from the count boxes, which complicates matters. I moved them so they would all be the same.
    You moved them back again. So it won't work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help! How to print multiple pages based on vlookup dataset
    By jackgreem in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-28-2021, 10:22 AM
  2. Print number of pages based on cell value
    By chris1888 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2020, 01:29 PM
  3. Print a specific number of pages based on cell value
    By janger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2020, 10:14 AM
  4. Print Pages Based On Cell
    By Anarchus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2017, 01:21 AM
  5. Print pages based on time in cell.
    By Macfool in forum Excel General
    Replies: 0
    Last Post: 07-11-2012, 01:25 PM
  6. print pages based on number in cell
    By lpratt in forum Excel General
    Replies: 3
    Last Post: 01-10-2012, 08:08 PM
  7. Print number of pages based on cell value
    By Rene Pronk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2011, 07:46 AM

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