View Single Post
  #2   Report Post  
Jef Gorbach
 
Posts: n/a
Default


"Pablano C. Pepper" <Pablano C. wrote in
message ...
When selecting multiple worksheets I would like to change the footer

without
affecting the header. I have a inventory workbook that I update monthly.

I
have the current month in the footer, but the headers are different for

each
worksheet.
Currently I can only change the footers one worksheet at a time. My
workbooks contain 25+ worksheets, so changing the footers one at a time is
not fun.


Correct the header/footer values to reflect your needs.

Sub title_pages()
a$ = InputBox("These reports are for what month?") 'get user input
For i = 1 To Sheets.Count
Sheets(i).select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "Company Name" & Chr(10) & "&A" & Chr(10) & a$
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P of &N"
.RightFooter = ""
End With
Next i
End Sub