B
Ben
Hi all,
I am not sure why, but I have notice a substantial code slow down when my
application enters the page setup code. This has occurred in xl97/ 2000/
2002. My code runs through multiple workbook files and in each file, there
are multiple tabs each with a different print range etc.
Can you share with me what might be the possible culprit or perhaps there
are some other work arounds? The code below is basically what Excel's macro
recorder.
ActiveSheet.PageSetup.PrintArea = sPrintRange
With ActiveSheet.PageSetup
.CenterFooter = "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.Orientation = xlLandscape
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.FitToPagesWide = 1
.FitToPagesTall = 10
.Zoom = iZoom
End With
Thanks so much for your thoughts.
Ben
--
I am not sure why, but I have notice a substantial code slow down when my
application enters the page setup code. This has occurred in xl97/ 2000/
2002. My code runs through multiple workbook files and in each file, there
are multiple tabs each with a different print range etc.
Can you share with me what might be the possible culprit or perhaps there
are some other work arounds? The code below is basically what Excel's macro
recorder.
ActiveSheet.PageSetup.PrintArea = sPrintRange
With ActiveSheet.PageSetup
.CenterFooter = "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.Orientation = xlLandscape
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.FitToPagesWide = 1
.FitToPagesTall = 10
.Zoom = iZoom
End With
Thanks so much for your thoughts.
Ben
--