Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
coding for footer,help please
Hello,
I have 120 worksheets in one excel file. I set print area in some sheets, some not. I use macro to set up footer. Page number for the first 25 is right. Then the next page number becomes 4,5,6,7...... .. After several correct sequent pages, the page number is wrong again. And repeat this again and again..... Any comments?? Thanks. Code is following: Public Sub tester() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets With ws.PageSetup .LeftHeader = "&A" .LeftFooter = "Page &P of &N" End With Next ws End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
coding for footer,help please
You have to group your sheets before printing to get sequential numbers
across worksheets. -- Regards, Tom Ogilvy "kathy" wrote in message oups.com... Hello, I have 120 worksheets in one excel file. I set print area in some sheets, some not. I use macro to set up footer. Page number for the first 25 is right. Then the next page number becomes 4,5,6,7...... .. After several correct sequent pages, the page number is wrong again. And repeat this again and again..... Any comments?? Thanks. Code is following: Public Sub tester() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets With ws.PageSetup .LeftHeader = "&A" .LeftFooter = "Page &P of &N" End With Next ws End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel footer to look like Word footer? | Excel Discussion (Misc queries) | |||
Coding | Excel Discussion (Misc queries) | |||
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? | Excel Programming | |||
Implant macro coding into ASP coding | Excel Programming | |||
Landscape Orientation when Footer set using mso-footer-data Disappear | Excel Programming |