Cannot get VBA to Change PageSetup.FitToPagesWide = 1
I got the code below by recording a macro while I manually selected the page
setup. When ever I don't know the format of an instruction for firt method
of solving the problem is to try a recorded macro.
With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
"EagleOne@microsoftdiscussiongroups" wrote:
2003
The following commands work fine:
ActiveWorkbook.Worksheets("STARS_UMD").PageSetup.O rientation = xlPortrait
ActiveWorkbook.Worksheets("STARS_UMD").PageSetup.O rientation = xlLandscape
The next commands do not "bomb" but that do not change the PageSetup as
listed.
ActiveWorkbook.Worksheets("STARS_UMD").PageSetup.F itToPagesWide = 1
ActiveWorkbook.Worksheets("STARS_UMD").PageSetup.F itToPagesTall = 1
I must go to the PageSetup wizard, make the change from 50% to 1 and 1.
Any thoughts and VBA changes helpful.
TIA EagleOne
|