Change Header on Multiple Sheets without Changing Other Formatting

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top