Barryj
08-06-2012, 04:45 AM
I want to print pages that contain data only, rows 1 & 2 have headers and there is also a custom header, the page setup also has rows 1 & 2 repeating for each page.
How can I modify the following macro to only print the pages that contain data from row 3.
The following macro that I have wants to print about 50 pages because the page setup has rows 1 & 2 repeating.
Private Sub CommandButton3_Click()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.PageSetup.PrintArea = "A3:I" & LastRow
End With
End Sub
Thanks for any help
How can I modify the following macro to only print the pages that contain data from row 3.
The following macro that I have wants to print about 50 pages because the page setup has rows 1 & 2 repeating.
Private Sub CommandButton3_Click()
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.PageSetup.PrintArea = "A3:I" & LastRow
End With
End Sub
Thanks for any help