Forum Discussion
Keith Farmery
Jun 01, 2017Copper Contributor
Macro to update Footers on multiple worksheets
Hi Is there anyone out there who can help with this? I'm creating a workbook for others to use, so I am aiming to include as much automation as possible. I need to update 50 sheets, all i...
Wyn Hopkins
Jun 01, 2017MVP
Hi Keith
This is the basic code
Sub RenameFooters() Dim wks As Worksheet For Each wks In Worksheets
wks.PageSetup.LeftFooter = Range("FooterText").Value
' note you can use .CenterFooter or . RightFooter
Next wks End Sub
Wyn Hopkins
Jun 01, 2017MVP
You could also trigger the code to run each time print is clicked
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wks As Worksheet For Each wks In Worksheets
wks.PageSetup.LeftFooter = Range("FooterText").Value
Next wks
End Sub