+ Reply to Thread
Results 1 to 2 of 2

Macro to print specific pages in a single worksheet (2007)

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    New Zealand
    MS-Off Ver
    2007
    Posts
    1

    Smile Macro to print specific pages in a single worksheet (2007)

    Hi,

    I am new to using VBA so any help would be very much appreciated. My current problem exists due to the fact that Excel 2007 does not have the ability to select multiple ranges to print, so I thought I would have a go at using VBA.

    To go into more detail of what I need help with;

    I have a worksheet containing multiple pages (Created by print area button) which need to converted to pdf. However not all pages are likely to be needed to print, just those that contain the relevant information that is filled in. To complicate matters the last page or summary page needs to be printed on every occasion.

    So in Short;

    34 pages in total.
    If 10 are in use then I would need pages 1-10 + page 34.

    I have gone so far as to include a formula in a cell (eg.A1) that will count the necessary pages that need printed ^1-10^, I though this may be helpful in the coding.

    As I said my knowledge with VBA is very limited so any help would be very appreciated.

    Thankyou

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Macro to print specific pages in a single worksheet (2007)

    the code should just be something like
    Please Login or Register  to view this content.
    from what information you have provided i dont know quite know how you determine what pages it goes up to

    ToPageNum being whatever page number you want to go up to
    you could probably extract that information from cell A1
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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. Need vba code to print specific pages or all pages in a multipage UserForm
    By Pimp_mentality in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2020, 08:13 PM
  2. [SOLVED] Macro below specific to a single Worksheet?
    By MIGARDEIN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2015, 02:06 PM
  3. Replies: 0
    Last Post: 09-02-2014, 12:59 PM
  4. how can i print non adjecent pages in excel 2007?
    By sumesh56 in forum Excel General
    Replies: 5
    Last Post: 04-03-2014, 09:53 PM
  5. [SOLVED] Print Macro to email PDFs of specific pages of a workbook to specific recipients
    By mike_vr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2012, 12:34 PM
  6. How can I print specifc pages in Excel 2007?
    By Earmite in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2012, 08:06 PM
  7. Print specific pages based on specific cells
    By cane corso in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2008, 05:23 PM

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