![]() |
Way to insert a footer in an entire workbook w/o altering headers
Everytime I select each tab and insert a picture for a footer, it messes up
the headers that are already established. Any suggestions? |
Way to insert a footer in an entire workbook w/o altering headers
Sure. You need to open your VBA editor (Alt+F11) and create a new module.
You can do that by going to the Tool Bar and selecting Insert = Module. Once you are in the new Module, paste in this code: Sub addFooter() Dim ws As Worksheet For Each ws In Worksheets ws.PageSetup.CenterFooter = "&P of &N" Next End Sub This particular code puts the Page # of Pages code in the middle. What were you looking to add? -- Regards, PJ Please rate this post using the vote buttons if it was helpful. "Deb" wrote: Everytime I select each tab and insert a picture for a footer, it messes up the headers that are already established. Any suggestions? |
Way to insert a footer in an entire workbook w/o altering headers
I just saw the note about adding a picture. Here is the code for that:
Sub addFooter Dim ws As Worksheet ActiveSheet.PageSetup.CenterFooterPicture.Filename = _ "File path and name here" For Each ws In Worksheets ws.PageSetup.CenterFooter = "&G" Next End Sub -- Regards, PJ Please rate this post using the vote buttons if it was helpful. "Deb" wrote: Everytime I select each tab and insert a picture for a footer, it messes up the headers that are already established. Any suggestions? |
All times are GMT +1. The time now is 09:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com