Tuesday, June 16, 2020

Print Excel Worksheet Data on One Page

Sub PrintEachSheet()
''Print Worksheets on One Page
 
 Dim visibleState As Long
    Dim sh As Worksheet

    For Each sh In ActiveWorkbook.Worksheets
        With sh.PageSetup
            ''exactly one page wide and tall
            .Zoom = False
            .FitToPagesTall = 1
            .FitToPagesWide = 1
        End With
    sh.PrintOut
    Next
End Sub


PrintOut Syntax
expression.PrintOut (From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, IgnorePrintAreas)

No comments:

Post a Comment

Hot Topics