ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating customised new spreadsheets (https://www.excelbanter.com/excel-programming/279224-creating-customised-new-spreadsheets.html)

Kevin

Creating customised new spreadsheets
 
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


Tom Ogilvy

Creating customised new spreadsheets
 
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.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
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





All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com