Excel ignoring VBA Print Settings


For some reason Excel is ignoring my "Fit 1 by 1" rule here. I tried to adjust the zoom but anything I do doesn't seem to work. Any ideas are utmost welcome! Thank you!

Private Sub CommandButton1_Click()
Dim Sel_Manager As String
'Specify headers to be repeated at the top
With ActiveSheet.PageSetup
        .PrintTitleRows = "$5:$9"
        .PrintTitleColumns = "$B:$M"
        .Orientation = xlLandscape
        .Zoom = 70
        .FitToPagesWide = 1
        .FitToPagesTall = 1
End With

'Manager selection through simple Inputbox
 Sel_Manager = ComboBox1
'Insert autofilter for worksheet
'Select manager defined in inputbox
ActiveSheet.Range("B14", Range("M14").End(xlDown)).AutoFilter Field:=1, Criteria1:=Sel_Manager
 'Select range to be printed and specify manager in filename
ActiveSheet.Range("B14", Range("M14").End(xlDown)).Select

Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Sel_Manager + ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True


End Sub

Show source
| excel-vba   | vba   | excel   | printing   2016-11-08 11:11 1 Answers

Answers to Excel ignoring VBA Print Settings ( 1 )

  1. 2016-11-08 11:11

    Fitting page and zooming excludes each other. Try to set:

    .Zoom = False

Leave a reply to - Excel ignoring VBA Print Settings

◀ Go back