Page set up for all worksheets
sub Main()
dim ws as worksheet
for each ws in worksheets
ws.activate
VBAMacro
next
End Sub
"Jodie" wrote:
Hello,
I am trying to run the following macro for all sheets in a workbook:
Sub VBAMacro()
Cells.Select
Range("D1").Activate
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.PrintGridlines = True
.Orientation = xlLandscape
.PrintTitleRows = ""
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 5
End With
ActiveWorkbook.Save
End Sub
How can I make it work?
--
Thank you, Jodie
|