I am working on a spreadsheet with a few frozen rows as the top. I need one of the cells to keep track of the page number, and another cell to keep track of the total number of pages.
This is what I've come up with so far.
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Notes:Please Login or Register to view this content.
-My document is one worksheet with over 1100 lines so far. The first 13 lines are frozen so that they appear on every page when printed. M4 and N4 are in those frozen lines; M4 should display, when printed, the page number (as it would be if I had a header/footer with page numbers, or the same numbers seen when the document is in Page Break Preview) and N4 should display the total number of pages in the document (currently 55 pages).
-The newest code above correctly counts the number of pages in the document and displays that in N4, but it also puts 55 in M4 instead of 1,2,3,... as I want it to. I've tried using the solution posted at http://answers.microsoft.com/en-us/o...2-6dea1ba813f9 but it doesn't seem to work since M4 is in the frozen rows at the top.
-This is the first macro I've ever worked on, so excuse my lack of knowledge
Bookmarks