G
Guest
Hi,
I have a couple of macros in which I create many (100-200) worksheets in one
workbook. As part of the formatting I have a loop with code like that shown
below to establish the page set up in each sheet. When I run this macro, it
looks to me like this part of the code inceases the macro run time
considerably. Is there any way to shorten this time?
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$3"
.PrintArea = "$A$1:$I" & NumRowsActSheet
.CenterHeader = "&""Arial,Bold""&12F820 Report for " & ActiveSheet.Name
.LeftFooter = "&P of &N"
.RightFooter = "&D &T"
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.PrintGridlines = True
.CenterHorizontally = True
.Orientation = xlLandscape
.Zoom = 100
End With
TIA.
I have a couple of macros in which I create many (100-200) worksheets in one
workbook. As part of the formatting I have a loop with code like that shown
below to establish the page set up in each sheet. When I run this macro, it
looks to me like this part of the code inceases the macro run time
considerably. Is there any way to shorten this time?
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$3"
.PrintArea = "$A$1:$I" & NumRowsActSheet
.CenterHeader = "&""Arial,Bold""&12F820 Report for " & ActiveSheet.Name
.LeftFooter = "&P of &N"
.RightFooter = "&D &T"
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.PrintGridlines = True
.CenterHorizontally = True
.Orientation = xlLandscape
.Zoom = 100
End With
TIA.