printing page numbers

  • Thread starter Thread starter richard bishop
  • Start date Start date
R

richard bishop

Hi all

I'm sure this is really easy, but I'm trying to put page
numbers in an Excel report. The pages are on many
different sheets, and are not the only data on each
sheet, and are printed using a macro. I seem to keep
going back to page 1 for each new sheet that I use. Can
anyone tell me what I'm doing wrong?

Thanks

Richard
 
Hi,
excel page numbering is more or less an automatic thing.
and seems to be sheet specific. each time you change
sheet, the numbering sequence resets.
to do what you want you would have to turn off auto
numbering and add the following code to your macro prior
to EACH print...
With ActiveSheet.PageSetup
.rightheader = ""
.centerheader= ""
.leftheader= "page number of total pages"
.rightfooter= ""
.centerfooter = ""
.leftfooter = "page number"
end with
you don't need all of the above, the the one where you
want the page number to appear. and you will have to set
the numbering sequence, the above is just examples.
regards
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top