I've created macro to create several reports. Each report have different layout, portrait or lansacpe etc. When the macro applied print range settings it seems quite slow, on my PC the whole job takes about half an hour, but on other department, with slower PC can take up to 4 hours. Is there a speedy way of applying print range? Here one of my script, can you make it faster...
Sub PrintLandscape(yend, xend)
ActiveSheet.PageSetup.PrintArea = "$A$1:$" & yend & "$" & xend
With ActiveSheet.PageSetup
.CenterFooter = "&A"
.LeftMargin = Application.InchesToPoints(0.3)
.RightMargin = Application.InchesToPoints(0.3)
.TopMargin = Application.InchesToPoints(0.33)
.BottomMargin = Application.InchesToPoints(0.7)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.33)
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
Sub PrintLandscape(yend, xend)
ActiveSheet.PageSetup.PrintArea = "$A$1:$" & yend & "$" & xend
With ActiveSheet.PageSetup
.CenterFooter = "&A"
.LeftMargin = Application.InchesToPoints(0.3)
.RightMargin = Application.InchesToPoints(0.3)
.TopMargin = Application.InchesToPoints(0.33)
.BottomMargin = Application.InchesToPoints(0.7)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.33)
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub