Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

All properties of PageSetup

Sub Macro1()     With ActiveSheet.PageSetup         .PrintTitleRows = ""         .PrintTitleColumns = ""     End With     ActiveSheet.PageSetup.PrintArea = ""     With ActiveSheet.PageSetup         .LeftHeader = ""         .CenterHeader = "&A"         .RightHeader = ""         .LeftFooter = ""         .CenterFooter = "Page &P"         .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         .PrintNotes = False         .CenterHorizontally = False         .CenterVertically = False         .Orientation = xlLandscape         .Draft = False         .PaperSize = xlPaperLetter         .FirstPageNumber = xlAutomatic         .Order = xlDownThenOver         .BlackAndWhite = False         .Zoom = 100     End With End Sub