Copy header footer to another sheet (vba?)

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi,

I spent a long time creating a perfect header and footer. Now i need it in another sheet within the same workbook.

How would I copy it across, retaining it exactly as it is?

Regards

T
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try

Code:
Sub test()
With Sheets("Sheet2").PageSetup
    .LeftHeader = Sheets("Sheet1").PageSetup.LeftHeader
    .CenterHeader = Sheets("Sheet1").PageSetup.CenterHeader
    .RightHeader = Sheets("Sheet1").PageSetup.RightHeader
    .LeftFooter = Sheets("Sheet1").PageSetup.LeftFooter
    .CenterFooter = Sheets("Sheet1").PageSetup.CenterFooter
    .RightFooter = Sheets("Sheet1").PageSetup.RightFooter
End With
End Sub
 
Upvote 0
Click the tab of the sheet containing your header, then Ctrl+click the other sheet. Choose File|Page Setup and click OK. Click any other sheet to exit Group mode.
 
Upvote 0
Both work....but the images contained in the header do not transfer across?

Regards

T
 
Upvote 0
I have a similar issue of needing to put a graphic in a different sheet's header/footer, but I cannot reference an external location. I can either copy the footer from another sheet in the workbook or I can copy the image from another location still within the same workbook. Are there any methods for doing this and still be able to get the graphic? Thanks
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top