VBA to prohibit changes to scale setting in page-setup
No, but you could use the Before_Print() event macro to reset the zoom
before printing.
Put something like this in your ThisWorkbook code module:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSheet As Worksheet
For Each wsSheet In ActiveWindow.SelectedSheets
With wsSheet.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
In article ,
Phil Hageman wrote:
I am using an auto-open and auto-close sub for a workbook with numberous
worksheets. The worksheets use different settings for scaling in page-setup
which guarantees full-page printing. Problem is, some users modify this
setting, which distorts printed copy. Is there code I could add in the
auto-open to disallow modifications to scale settings, and then to restore
the capability upon close?
Thanks,
Phil
|