ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change Header on Multiple Sheets without Changing Other Formatting (https://www.excelbanter.com/excel-discussion-misc-queries/262107-change-header-multiple-sheets-without-changing-other-formatting.html)

David

Change Header on Multiple Sheets without Changing Other Formatting
 
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

Gord Dibben

Change Header on Multiple Sheets without Changing Other Formatting
 
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

On Wed, 21 Apr 2010 13:20:01 -0700, David
wrote:

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




All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com