New workbook - automatically insert header

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

Hi

Each time I create a new workbook I want Excel to insert a
the header and footer to every sheet of the new workbook.
Where would I place the code for this? I guess the code
would be something to similar to below

With ActiveSheet.PageSetup
.CenterHeader = "&A"
.CenterFooter = "Printed &D &T"
End With

but not sure where to put it - presume in my personal
workbook somewhere, but what sheet, what function etc#

thanks in advance
 
You can create the macro, save it in your personal.xls and give it a
shortcut key say, H. That way everytime you create a new workbook all you
need to do is hit the keys CTRL+H and your header and footer will be created
for you.

HTH
 
Back
Top