Hello,
I have the following code to set the print area on a tab. I thought I had it so that it will find the last used row but it is still setting up with extra blank pages. The data on the tab can change monthly but the columns will remain the same. Any help?
Public Sub Workbook_BeforePrint2()Please Login or Register to view this content.
Dim lastrow As Long
lastrow = Worksheets("By Mall - In Place").Range("AD1048576").End(xlUp).Row
Dim rng As Range
Set rng = Worksheets("By Mall - In Place").Range("AD1:AS" & lastrow)
Worksheets("By Mall - In Place").PageSetup.PrintArea = rng
ActiveWindow.ActiveSheet.PrintPreview
End SubPlease Login or Register to view this content.
Bookmarks