Page totals
Your code worked fine for me.
--
Regards,
Tom Ogilvy
"Buckosmasher" wrote in message
...
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
|