Part of a more elaborate VB script is to setup the page.
This part is taken from a macro recording where I remove any unnecessary lines.
With ActiveSheet.PageSetup
.PrintTitleRows = "$4:$4"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = "&D"
.CenterFooter = "&F"
.RightFooter = "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(1.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.FitToPagesWide = 1
.FitToPagesTall = 500
.PrintErrors = xlPrintErrorsDisplayed
End With
When I run the macro, the screen flickers and this simple step takes 4 - 5 seconds. This may not seem like much but my script produces 800 to 1000 new spreadsheets so, do the math
Is this normal or is there any way to speed it up ??
Thanks for any suggestion !
This part is taken from a macro recording where I remove any unnecessary lines.
With ActiveSheet.PageSetup
.PrintTitleRows = "$4:$4"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = "&D"
.CenterFooter = "&F"
.RightFooter = "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(1.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.FitToPagesWide = 1
.FitToPagesTall = 500
.PrintErrors = xlPrintErrorsDisplayed
End With
When I run the macro, the screen flickers and this simple step takes 4 - 5 seconds. This may not seem like much but my script produces 800 to 1000 new spreadsheets so, do the math
Is this normal or is there any way to speed it up ??
Thanks for any suggestion !