New workbook - automatically insert header

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
 
C

Cliff Myers

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
 

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