Change Header on Multiple Sheets without Changing Other Formatting

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hello

I have a file with sheets that have the same header. Each tab has specific
page setup formatting that I need to keep intact. I tried highlighting all
tabs and changing the header via page setup but the other page setup
formatting changed to the formatting of the first sheet.

Is there a way to add the header I would like to put on all tabs to the
header drop down menu on header/footer tab in page setup.

Thanks
 
Only through VBA.

Sub Text_In_AllFooters()
Dim WS As Worksheet
For Each WS In ActiveWorkbook.Sheets
WS.PageSetup.CenterHeader = "Some text or whatever"
Next
End Sub

More details on what you want in the header could get you less generic code
tailored to your needs.


Gord Dibben MS Excel MVP
 
Back
Top