Private Sub Workbook_BeforePrint(Cancel As Boolean)
Const sFOOTER As String = "my footer"
Dim wsSheet As Worksheet
Cancel = True
Application.EnableEvents = False
For Each wsSheet In ActiveWindow.SelectedSheets
With wsSheet
.PageSetup.LeftFooter = ""
.PrintOut from:=1, To:=1
.PageSetup.LeftFooter = sFOOTER
.PrintOut from:=2
End With
Next wsSheet
Application.EnableEvents = True
End Sub
Substitute CenterFooter or RightFooter for LeftFooter as applicable.
This prints the footer on the first page of every sheet.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.