Page totals

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Need to print multiple pages from several sheets. The first page may be a cover page and does not count in the total. I used the code to set the footer. The page numbers work but the total does not. If there are a total of three pages with the first being the cover I would like to see the first page after the cover say Page 1 of 2, but it displays page 1 of 31.

Sub TestFooter()

mOffsetPageCounter = "-1"
mrf = "&8Page " & "&P" & mOffsetPageCounter & " of " & "&N" & mOffsetPageCounter

With Sheets("sheet1").PageSetup
.RightFooter = mrf
End With

With Sheets("sheet2").PageSetup
.RightFooter = mrf
End With

mfooter = Sheets("sheet2").PageSetup.RightFooter

MsgBox mfooter
End Sub
 
Your code worked fine for me.

--
Regards,
Tom Ogilvy

Buckosmasher said:
Need to print multiple pages from several sheets. The first page may be a
cover page and does not count in the total. I used the code to set the
footer. The page numbers work but the total does not. If there are a total
of three pages with the first being the cover I would like to see the first
page after the cover say Page 1 of 2, but it displays page 1 of 31.
 

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