Creating customised new spreadsheets

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. I
dont want to have to create any buttons to do this, simply
when i open a new sheet it should be automatically updated

thanks in advance
 
T

Tom Ogilvy

If you want it to occur in all worksheets or all workbooks, why not create a
custom template for your computer.

find your xlstart directory and put in a template name Book.xlt or
Sheet.xlt. When you create these, put in all the formatting and so forth
that you want to be the default, including the header and footer.

See Excel help for details.
 

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