Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page of pages is not updating in first page header!!

Status
Not open for further replies.

LyonL

Programmer
Jul 29, 2004
6
US
Is there some kind of macro I can make to force Sheet 1 of _ to update everytime a page is added? The Page of Pages option is not working for some reason. I think it has to do with the header being different between the first page and all following pages.

Please help. If you have any ideas, I would really appreciate you input.
Thanks.
 
If this is Excel (2000 or earlier, anyway), the concept of a different first-page header is not supported, so the scenario you outlined can't arise. Of course, if you're referring to headers on different worksheets, that's another matter.

If this is Word, it's just a matter of setting up the page numbering fields correctly - no macros required.

Cheers
 
It is Excel 2003, and they are the same worksheet. However, they are different headers. I've tried to redo the first page header for the page of pages to update when a page is added, like it should, but nothing is working. The page of pages updates correctly for every page after the first page.

Thanks.
 
However, they are different headers
And how did you that ?
 
I found the problem and answer to it. Thanks to your help!

To recap the problem:

It is an excel document, that has been transfered into a word document. Or, possibly a table created in word. The first page header has nothing in it. The document says "Sheet 1 of 1" at the top of a table (along with other information). There is not a section break between page1 and page2. The second page contains a valid header with "Sheet 2 of 2" in it and correctly updates if more pages are added. I don't understand why the page numbers would update on the second page (and beyond) in a header, but not update on the first page when it is not in a header. No matter how many pages there are, the first page remains "Sheet 1 of 1".

The answer is:

The document automatically updates the page numbers before it prints, or if you use print preview. I had not seen this, since I only updated the information and never printed.

Thank you again for your help.
 
In that case, it seems the problem has nothing to do with Excel - it's a Word document - and may only have a table (not an embedded Excel worksheet)!!

As you seem to have deduced, page number fields (even when prefixed with words like "Sheet") in Word do not dynamically update when they're in the body of the document.

In this case, it seems like your document has been set up with a 'different first page' header, which is why there's nothing in the first page header. If you either removed that setting (File|Page Setup|Layout) or copied the header from the second page into the first page header, the problem would be solved. Of course, you might not want this since you have 'other information' on the first page also ...


Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top