A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Excel-Footer Mass change of only Header and not footer



 
 
Thread Tools Display Modes
  #1  
Old January 16th, 2004, 09:26 AM
M.Raguram
external usenet poster
 
Posts: n/a
Default Excel-Footer Mass change of only Header and not footer

In Excel, there are 20 worksheets with independent header
and footers defined.

Now I need to change only header en-mass and without
changing the footer. When I try to change the header by
selecting multiple worksheets and change the header, the
footer of the main page gets applicable to all sheets.

Can we change only header at one-go and not the footer.
  #2  
Old January 16th, 2004, 12:30 PM
Debra Dalgleish
external usenet poster
 
Posts: n/a
Default Excel-Footer Mass change of only Header and not footer

You could change the headers programmatically:

'==================================
Sub ChangeHeader()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws.PageSetup
.LeftHeader = "&D"
.CenterHeader = ""
.RightHeader = "&F"
End With
Next ws
End Sub
'====================================

M.Raguram wrote:
In Excel, there are 20 worksheets with independent header
and footers defined.

Now I need to change only header en-mass and without
changing the footer. When I try to change the header by
selecting multiple worksheets and change the header, the
footer of the main page gets applicable to all sheets.

Can we change only header at one-go and not the footer.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.