A
Alan
In the VBA Sub below, all the settings are being changed EXCEPT
scaling the print area to 1 x 1 page. Does anyone know what might
cause this?
I checked by going to Print Preview. But, the 100% scaling box
was checked, not the next one. I am using Excel 2007.
Thanks, Alan
Sub ChangePrintSetup(DataWB As Workbook)
'
' Select columns A through P
With DataWB.ActiveSheet.PageSetup
' Select columns for the print area
.PrintArea = "$A:$P"
' Add print footer
.CenterFooter = "Page &P of &N"
' Set the margins for printing
.TopMargin = Application.InchesToPoints(0.66)
.BottomMargin = Application.InchesToPoints(0.66)
.LeftMargin = Application.InchesToPoints(0.95)
.RightMargin = Application.InchesToPoints(0.95)
' Scale print area to 1 page
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
scaling the print area to 1 x 1 page. Does anyone know what might
cause this?
I checked by going to Print Preview. But, the 100% scaling box
was checked, not the next one. I am using Excel 2007.
Thanks, Alan
Sub ChangePrintSetup(DataWB As Workbook)
'
' Select columns A through P
With DataWB.ActiveSheet.PageSetup
' Select columns for the print area
.PrintArea = "$A:$P"
' Add print footer
.CenterFooter = "Page &P of &N"
' Set the margins for printing
.TopMargin = Application.InchesToPoints(0.66)
.BottomMargin = Application.InchesToPoints(0.66)
.LeftMargin = Application.InchesToPoints(0.95)
.RightMargin = Application.InchesToPoints(0.95)
' Scale print area to 1 page
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub