#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Page totals

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
stop page totals creeping up page when scrolling VB Excel Discussion (Misc queries) 0 March 24th 09 11:28 PM
Sub Totals In Footer/End of the page? FARAZ QURESHI Excel Discussion (Misc queries) 0 August 30th 07 05:36 AM
PAGE TOTALS? FARAZ QURESHI Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
HOW DO I SETUP A PAGE IN EXCEL TO GIVE TOTALS TO ANOTHER PAGE Randy Excel Worksheet Functions 1 February 8th 07 06:15 PM
print footer on every page (Totals on every page) sweetyoli Excel Discussion (Misc queries) 1 January 3rd 07 09:26 PM


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"