Print Setup Not Set

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
 
A

Alan

Never mind. Adding a ".Zoom = False" prior to the "FitToPages..."
statements fixed the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top