How to set 'Fit all columns on one page' in print tab How to set 'Fit all columns on one page' in print tab vba vba

How to set 'Fit all columns on one page' in print tab


Try setting the .FitToPagesTall to False to be able to manually set the .FitToPagesWide property.

MSDN link

If this property is False, Microsoft Excel scales the worksheet according to the FitToPagesWide property. If the Zoom property is True, the FitToPagesTall property is ignored.

Sub PrintColumns()    Application.PrintCommunication = False    With Sheets("Print Letter").PageSetup        .FitToPagesWide = 1        .FitToPagesTall = False    End With    Application.PrintCommunication = TrueEnd Sub