Looking to get the same header and footer on a page by not typing it over and over again tried making a template but by doing that you can only use it on one sheet it won’t let you open the template twice and it only appers on one sheet is there a way to make a template to show up on multi sheets
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
excel headers and footers
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » excel headers and footers
- This topic has 9 replies, 6 voices, and was last updated 23 years, 12 months ago.
Viewing 2 reply threadsAuthorReplies-
H. Legare Coleman
AskWoody PlusMarch 21, 2001 at 12:08 am #1780516Thanks for moving this question here so that others can benefit from the discussion. One additional point. If you had made this a reply to my reply to your first question, then everyone would have an easier time following the conversation.
I’m not sure what you did to get a problem with opening the template twice. With what I recommended in my previous message, you should not have to open the template at all. If the template is in the XLStart directory, it should automatically open new workbooks based on the template. You should never have to open the template. If my suggestions below do not solve your problem, could you describe exactly what you did?
In my previous reply, I may not have been completely clear. When you create the Book.xlt template file, you need to create the header and footer you want in every sheet in the template. If you want the default workbook to have three worksheets, and each one to have the default header and footer, then when you create the template, you need to have three sheeets in it and put the header and footer in all of them. Then store the workbook as a template in the XLStart directory.
Now, one other detail that I forgot. If you want new sheets that you insert into a workbook to also have this default header and footer, you need to create another template file. This file should have only one sheet in it and that sheet should have the same header and footer. Then save this file as a template named Sheet.xlt in the XLStart directory. Now, new sheets inserted in workbooks should have the default header and footer.
One other point. None of the above will affect workbooks that already exist. You will either have to manually modify those, or write a macro that will open each workbook and add the default header and footer to each sheet.
-
gwtida
GuestMarch 21, 2001 at 12:57 am #1780523Okay I will tell you step by step what it is i’m doing
1. make the header and footer
2. save as type template (*xlt)
3. file name give it a name and .xls (example book.xlt)
4. go to file / new / and double click on the file name (example book.xlt)
5. when you go to sheet 1 it is there but when you go to sheet 2 it is not there the header and footer
6. so i went to file / new / and double click on the file name (example book.xlt) it won’t let you do it that way beacuse it is a message comes up file already open -
WSGeneO
AskWoody LoungerMarch 21, 2001 at 1:14 am #1780527It sounds as if you only set-up your desired header/footer on one sheet. If you want the same thing on multiple sheets, do a Group select (select left most sheet, hold down Shift key and select right most sheet) of all the sheets you want to have the same header/footer. Go to File-Page Setup-Header/Footer and enter the data you want. ALL the sheets you have selected will now have the same header/footer.
-
gwtida
Guest
-
-
-
H. Legare Coleman
AskWoody PlusMarch 21, 2001 at 1:41 am #1780529It looks like you are doing two things wrong.
1- You did not put the Book.xlt file into your XLStart directory. If you put it there, then it will be automatically opened when you create a new workbook. You do not need to double click on the template in the File New menu, just opening Excel should use the template, and doing a file new and double clicking the default template should also use it.
2- Headers and Footers must be set on all sheets in a workbook. When you created the template file, you needed to select Sheet1 and create the header and footer, then select Sheet2 and create the header and footer for that sheet, and do this for every sheet in the template.
Also, if you want new sheets inserted into a workbook to have the header and footer, you will need to create the Sheet.xlt file I described in another post.
-
WSJohnBF
AskWoody Lounger -
WSAndrew Cronnolly
AskWoody LoungerMarch 21, 2001 at 5:04 pm #1780569
-
-
-
WSHans Pottel
AskWoody LoungerMarch 21, 2001 at 12:09 am #1780517If you put in the following code
Private Sub Workbook_Open()
Dim Sh As Worksheet
For Each Sh In Worksheets
With Sh.PageSetup
.LeftHeader = “Hello”
.LeftFooter = “This is the end”
End With
Next
End Subin the ThisWorkbook module and save the workbook as a template (.xlt), then, I think, all sheets in the worksheet collection should have the header and footer as given in the macro.
WSHans Pottel
AskWoody LoungerMarch 21, 2001 at 1:05 am #1780526This is maybe something typically for an application event. Just try this:
Open an empty workbook. This is the workbook that we will change into a template. Now put in as many worksheets as you want every new workbook to contain that is created from this template. Now you need to put in the following code:
In the ThisWorkbook module, put in
Private Sub Workbook_Open()
Call init
End SubAdd a module and put in
Dim AppObj As New ClsApp
Sub init()
Set AppObj.AppEvent = Excel.Application
End SubSub stopit()
Set AppObj = Nothing
End SubAdd a Class module, name it ClsApp and put in
Public WithEvents AppEvent As Excel.Application
Private Sub AppEvent_WorkbookBeforeClose(ByVal Wb As Excel.Workbook, Cancel As Boolean)
stopit
End SubPrivate Sub AppEvent_WorkbookNewSheet(ByVal Wb As Excel.Workbook, ByVal Sh As Object)
Sh.PageSetup.CenterHeader = “Hello”
Sh.PageSetup.CenterFooter = “This is the end”
End SubPrivate Sub AppEvent_WorkbookOpen(ByVal Wb As Excel.Workbook)
Dim Sh As Worksheet
For Each Sh In Wb.Worksheets
Sh.PageSetup.CenterHeader = “Hello”
Sh.PageSetup.CenterFooter = “This is the end”
Next
End SubNow save your workbook as a template (e.g. HeaderFooter.xlt) and now make a new workbook using File >> New and selecting the HeaderFooter template. Every worksheet in the new workbook should contain the header “Hello” and the footer “This is the end”. Each time you insert a new worksheet in the workbook, it should automatically have the same header and footer. Alter the code as you wish.
Hope this helps.Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Finding Microsoft Office 2021 product key
by
Kathy Stevens
33 minutes ago -
Over-the-Top solves it!
by
RetiredGeek
9 hours, 49 minutes ago -
To Susan – Woody Leonhard, the “Lionhearted”
by
Myst
16 hours, 50 minutes ago -
Extracting Data From All Sheets
by
WSJon5
18 hours, 25 minutes ago -
Use wushowhide in Windows 11 24H2?
by
Tex265
18 hours, 33 minutes ago -
Hacktool:Win32/Winring0
by
Marvel Wars
5 hours, 14 minutes ago -
Microsoft Defender as Primary Security Question
by
blueboy714
2 hours, 55 minutes ago -
USB printers might print random text with the January 2025 preview update
by
Alex5723
21 hours, 3 minutes ago -
Google’s 10-year-old Chromecast is busted, but a fix is coming
by
Alex5723
1 day, 6 hours ago -
Expand the taskbar?
by
CWBillow
1 day, 6 hours ago -
Gregory Forrest “Woody” Leonhard (1951-2025)
by
Susan Bradley
32 minutes ago -
March 2025 updates are out
by
Susan Bradley
7 hours, 42 minutes ago -
Windows 11 Insider Preview build 26120.3380 released to DEV and BETA
by
joep517
2 days ago -
Update Firefox to prevent add-ons issues from root certificate expiration
by
Alex5723
2 days, 7 hours ago -
Latest Firefox requires Password on start up
by
Gordski
2 days, 1 hour ago -
Resolved : AutoCAD 2022 might not open after updating to 24H2
by
Alex5723
2 days, 20 hours ago -
Missing api-ms-win-core-libraryloader-11-2-1.dll
by
IreneLinda
1 day, 19 hours ago -
How Much Daylight have YOU Saved?
by
Nibbled To Death By Ducks
1 day, 21 hours ago -
A brief history of Windows Settings
by
Simon Bisson
1 day, 15 hours ago -
Thunderbolt is not just for monitors
by
Ben Myers
1 day, 14 hours ago -
Password Generators — Your first line of defense
by
Deanna McElveen
1 day, 19 hours ago -
AskWoody at the computer museum
by
Will Fastie
19 hours, 30 minutes ago -
Planning for the unexpected
by
Susan Bradley
1 day, 20 hours ago -
Which printer type is the better one to buy?
by
Bob99
2 days, 21 hours ago -
Upgrading the web server
by
Susan Bradley
2 days, 20 hours ago -
New Windows 11 24H2 Setup – Initial Win Update prevention settings?
by
Tex265
3 days, 15 hours ago -
Creating a Google account
by
DavidofIN
3 days, 14 hours ago -
Undocumented “backdoor” found in Bluetooth chip used by a billion devices
by
Alex5723
3 days, 20 hours ago -
Microsoft Considering AI Models to Replace OpenAI’s in Copilot
by
Alex5723
4 days, 7 hours ago -
AI *emergent misalignment*
by
Alex5723
4 days, 8 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.