thunder_anger
Board Regular
- Joined
- Sep 27, 2009
- Messages
- 206
this code will print a selection
with title rows only from page 2
it stops at this
with title rows only from page 2
it stops at this
Code:
.PrintTitleRows = Selection.Rows("5:7")
Code:
Sub printonlyselection()
Dim lPages As Long
lPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
Selection.PrintOut From:=1, To:=1
.PrintTitleRows = Selection.Rows("5:7")
Selection.PrintOut From:=2, To:=lPages
.PrintTitleRows = ""
End With
End Sub