Hi,
I am struggling to make a worksheet fit to one page width only.
If I use the following code :
The page width is not set to 1 page
If I use this one :
I get an error on .FittoPagesTall = 0 line
What is the proper way to write this?
I am struggling to make a worksheet fit to one page width only.
If I use the following code :
Code:
With ActiveWorkbook.Sheets(2).PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.FitToPagesWide = 1
The page width is not set to 1 page
If I use this one :
Code:
With ActiveWorkbook.Sheets(2).PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FittoPagesTall = 0
I get an error on .FittoPagesTall = 0 line
What is the proper way to write this?
Last edited: