+ Reply to Thread
Results 1 to 5 of 5

Number of pages in the workbook

  1. #1
    Registered User
    Join Date
    03-11-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    3

    Question Number of pages in the workbook

    I have a workbook with 3 sheets. Each of these sheets can contain up to 5 pages. The formatting is different on each sheet.
    My customer wants to see "Page x of y" written in a certain cell (not in the header - that would be too easy ) and y = number of pages in the workbook!
    I found some scripts that can determine the number of pages in a sheet but none that can determine the number of pages in the whole workbook.
    Anybody got any hint how to solve this problem?

    Thanks, Harry

  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,798

    Re: Number of pages in the workbook

    Quote Originally Posted by HarryX View Post
    I found some scripts that can determine the number of pages in a sheet but none that can determine the number of pages in the whole workbook.
    I could do this from scratch but it will be easier to start with what you already have. If you post the code that determines pages in a sheet I'll show you how to iterate through all the sheets and add up pages in the whole workbook.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-11-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    3

    Re: Number of pages in the workbook

    This worked best so far:

    Please Login or Register  to view this content.

    I found it here

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Number of pages in the workbook

    Good evening HarryX
    Quote Originally Posted by HarryX View Post
    I found some scripts that can determine the number of pages in a sheet but none that can determine the number of pages in the whole workbook.
    John Walkenbach has a solution to this here on his old pages.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  5. #5
    Registered User
    Join Date
    03-11-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003 + 2007
    Posts
    3

    Re: Number of pages in the workbook

    Thanks dominicb, looks like a good point to start from!

+ 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