Hi,
The following command will help me change the pagesetup for the first sheet of the workbook.
With Worksheets(1).PageSetup
.LeftHeader = ""
.CenterHeader = "&A"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.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 = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
' .FitToPagesTall = 1
End With
Can anyone help me, if i want the same thing to happen to the whole workbook instead of only first sheet of the workbook.
I have also tried
With ActiveSheet.PageSetup
Other commands remaining the same.
But its no use for me, as I want this to happen for all sheets of the workbook.
This is part of the excel marco.
Thanks for help.
Raj
The following command will help me change the pagesetup for the first sheet of the workbook.
With Worksheets(1).PageSetup
.LeftHeader = ""
.CenterHeader = "&A"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.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 = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
' .FitToPagesTall = 1
End With
Can anyone help me, if i want the same thing to happen to the whole workbook instead of only first sheet of the workbook.
I have also tried
With ActiveSheet.PageSetup
Other commands remaining the same.
But its no use for me, as I want this to happen for all sheets of the workbook.
This is part of the excel marco.
Thanks for help.
Raj