D Deb Apr 7, 2009 #1 Everytime I select each tab and insert a picture for a footer, it messes up the headers that are already established. Any suggestions?
Everytime I select each tab and insert a picture for a footer, it messes up the headers that are already established. Any suggestions?
P PJFry Apr 7, 2009 #2 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?
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?
P PJFry Apr 7, 2009 #3 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
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