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 <9A31D88E-5728-4023-BD2B-(E-Mail Removed)>,
Mike H. <(E-Mail Removed)> 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 <CFB5BB44-FE27-4375-B656-(E-Mail Removed)>,
> > Mike H. <(E-Mail Removed)> 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
> >
|