I have 18 sheets to print which are all of the same range
I have attached a sample workbook containing one sheet where I written a macro to print the data
I would like the macro to print this so that it fits on two pages
Your assistance is most appreciated
I have attached a sample workbook containing one sheet where I written a macro to print the data
I would like the macro to print this so that it fits on two pages
Your assistance is most appreciated
Code:
sub PrintData()
Dim LastRow As Long
Application.ScreenUpdating = False
Sheets("Sales1").Select
LastRow = Sheets("sales1").Cells(Rows.Count, "A").End(xlUp).Row
With ActiveSheet.PageSetup
.PrintArea = "A2:Q" & LastRow
.PrintGridlines = True
.PrintTitleRows = ""
.PrintTitleColumns = ""
.LeftHeader = "&D&T"
.CenterHeader = "Sales1"
.Orientation = xlLandscape
End With
Application.ScreenUpdating = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub