+ Reply to Thread
Results 1 to 2 of 2

VBA Print & Page numbers

  1. #1
    Registered User
    Join Date
    06-04-2010
    Location
    Bolton, England
    MS-Off Ver
    Excel 2003
    Posts
    16

    VBA Print & Page numbers

    Hi all,

    I'm having a real tough time at the minute trying to get the correct page numbers to display on an excel file that is ultimately printed as a .pdf document.

    I have a workbook containing 30 sheets that are printed into a .pdf document. Within the document I have some code that prints each sheet seperately and places a page number on the page.

    Here's the code:

    Please Login or Register  to view this content.
    The problem I have is when one of the sheets is displayed over two or more pages. The code puts the same page number on each of the sheets. I've been searching high and low to find something which follows this logic;

    Please Login or Register  to view this content.
    Anyone got any idea's on how I can overcome this?

    Thanks,
    Lee

  2. #2
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: VBA Print & Page numbers

    how about changing your appraoch slightly and selecting all of the worksheets using something like Sheets(Array("A","B","C").Select and then using ActiveWindow.SelectedSheets.PrintOut. Then Printout will keep track of page numbering.
    Bob
    Click my star if my answer helped you. Mark the thread as [SOLVED] if it has been.

+ 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