Forked from DataSolveProblems/PrintArea Fit Into One Page.bas
Last active
September 14, 2020 11:16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Helps set print area of a worksheet so that print preview doesn't overflow | |
Public Sub PrintExcelSelection() | |
Dim ws As Worksheet: Set ws = ThisWorkbook.ActiveSheet | |
With ws.PageSetup | |
.Orientation = xlLandscape | |
.Zoom = False | |
.FitToPagesTall = 1 | |
.FitToPagesWide = 1 | |
.PrintArea = ActiveCell.CurrentRegion.Address | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment