G
Guest
Guest
I am usiing the Marco below to set the page orientation, gridlines and paper size. Is there a better way to do this? This seems to take a long time to run. Thanks
Sub setpage()
With ActiveSheet.PageSetup
'.LeftHeader = ""
'.CenterHeader = ""
'.RightHeader = ""
'.LeftFooter = ""
'.CenterFooter = ""
'.RightFooter = ""
'.LeftMargin = Application.InchesToPoints(0.75)
'.RightMargin = Application.InchesToPoints(0.75)
'.TopMargin = Application.InchesToPoints(1)
'.BottomMargin = Application.InchesToPoints(1)
'.HeaderMargin = Application.InchesToPoints(0.5)
'.FooterMargin = Application.InchesToPoints(0.5)
'.PrintHeadings = False
.PrintGridlines = True
'.PrintComments = xlPrintNoComments
'.PrintQuality = 300
'.CenterHorizontally = False
'.CenterVertically = False
.Orientation = xlLandscape
'.Draft = False
.PaperSize = xlPaperLegal
'.FirstPageNumber = xlAutomatic
'.Order = xlDownThenOver
'.BlackAndWhite = False
'.Zoom = 100
End With
'ActiveWindow.SelectedSheets.PrintPreview
End Sub
Sub setpage()
With ActiveSheet.PageSetup
'.LeftHeader = ""
'.CenterHeader = ""
'.RightHeader = ""
'.LeftFooter = ""
'.CenterFooter = ""
'.RightFooter = ""
'.LeftMargin = Application.InchesToPoints(0.75)
'.RightMargin = Application.InchesToPoints(0.75)
'.TopMargin = Application.InchesToPoints(1)
'.BottomMargin = Application.InchesToPoints(1)
'.HeaderMargin = Application.InchesToPoints(0.5)
'.FooterMargin = Application.InchesToPoints(0.5)
'.PrintHeadings = False
.PrintGridlines = True
'.PrintComments = xlPrintNoComments
'.PrintQuality = 300
'.CenterHorizontally = False
'.CenterVertically = False
.Orientation = xlLandscape
'.Draft = False
.PaperSize = xlPaperLegal
'.FirstPageNumber = xlAutomatic
'.Order = xlDownThenOver
'.BlackAndWhite = False
'.Zoom = 100
End With
'ActiveWindow.SelectedSheets.PrintPreview
End Sub