Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Wacky page numbering

    An Excel file I use for my company's annual operating budget has gone wacky with page numbering. The file contains 64 sheets of which 50 are printed for distribution. The first two printed sheets are a title page and table of contents, neither of which require page numbers.

    All was well until recently, when the page numbers got goofy and now increment from -1 to 0 to 1 for a sheet that prints on three pages. Each new worksheet starts at -1 then steps up by one. Sheets that print on two pages display -1 then 0. A sheet that prints on seven pages displays the page numbering from -1 through 5. So when all of these sheets are printed together it goes from -1 to 0 then -1 to 0 then from -1 to 5 and so on and on, resetting to -1 for each new worksheet.

    I have tried closing then reopening the file; then closing the file, exiting Excel the reopening the file; deleting page numbering from all 50 sheets; rebooting and maybe a few choice words along the way, but nothing seems to work.

    Can you offer a solution to my wacky page numbering?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    My first speculation is that there is code setting the page numbering and the calcuation logic is wrong. Steve

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I checked VB and there are no macros. I had created a very simple one to try to help me reset the page numbering; the first use was to delete the existing numbering one sheet at a time, then I modified it to add back numbering.

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,813
    Thanks
    132
    Thanked 479 Times in 456 Posts
    Hi

    When you say you checked VB and there are no macros, how did you check this?
    Did you just look to see if there were any Modules?

    When you open the file, does it prompt you for macros?
    Macros can be stored in many places, not just in VBA Modules.
    For example, there may be a Workbook_BeforePrint routine found on the ThisWorkbook object.

    zeddy

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    There was an empty module, probably leftover from the simple macro I described above and then deleted since it served no purpose. There has never been a Workbook_BeforePrint routine before. I am the only user of this file I didn't think of looking anywhere else. Double-clicking on the ThisWorkbook object shows only a blank window.

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    In page setup what is the "first page number"? Is it "Auto" or is it "-1"?

    Steve

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    That's just dandy. A minus one. How'd that get there? It's on all the sheets too. I used a very simple macro to reset page numbering, but that was only after I discovered the page numbering problem. Up until then there were no macros of any kind in this workbook. I should have noticed that before posting here.

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    Did you inherit the sheet from someone? I speculate that someone wanted page 1 to start on the page after the Title and TOC pages.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •