Yes, PageSetup properties are very slow when you set them.
You have already installed Application.ScreenUpdating = False, which is good, but equally (or more) an important step in this case is the installation Application.Calculation = xlCalculationManual. (It’s best to save these settings and then restore them at the end of the original.)
, get PageSetup , , . , , , ( ) .
, , :
Dim origScreenUpdating As Boolean
origScreenUpdating = Application.ScreenUpdating
Application.ScreenUpdating = False
Dim origCalcMode As xlCalculation
origCalcMode = Application.Calculation
Application.Calculation = xlCalculationManual
With ActiveSheet.PageSetup
If .PrintHeadings <> False Then .PrintHeadings = False
If .PrintGridlines <> False Then .PrintGridlines = False
If .PrintComments <> xlPrintNoComments Then .PrintComments = xlPrintNoComments
' Etc...
End With
Application.ScreenUpdating = origScreenUpdating
Application.Calculation = origCalcMode
: :
Excel 2010 "Application.PrintCommunication", Excel 2007 "ExecuteExcel4Macro". . Excel 4 VBA.
Excel 2007 - "Microsoft XPS Document Writer", . 3 . : Excel PageSetup.
, ...