Add Footer to All Sheets
Yeah - didn't look closely at that line - should be
For Each WSheet in Worksheets
or, more qualified:
For Each WSheet In ActiveWorkbook.Worksheets
In article ,
Mike H. wrote:
That modification doesn't compile for me. I get a Variable not defined error
on the For statement?????
"JE McGimpsey" wrote:
One way:
Change
With ActiveSheet.PageSetup
to
With WSheet.PageSetup
In article ,
Mike H. wrote:
How do I add a footer to all sheets. This doesn't work because the
activesheet is not selected, I dont' think.
Sub AddFooters()
Dim WSheet As Worksheet
For Each WSheet In Worksheet
With ActiveSheet.PageSetup
.LeftFooter = "&Z&F"
.RightFooter = "&A"
.Zoom = False
End With
Next WSheet
End Sub
|