Hi,
Thanks Andy. For the benefit of others, my final code is as follows:
Sub Print_Pages()
Dim StartPage As Long
Dim Endpage As Variant
Dim Page As Integer
Dim answer As Integer
StartPage = 1
query: Endpage = Application.InputBox("From page 1 to...?", "Print Options")
If Endpage = "" Then Exit Sub
If Endpage <= 5 Then
For Page = StartPage To Endpage
ActiveSheet.PrintOut from:=Page, To:=Page, Copies:=1, Collate:=True
Next
Else
answer = MsgBox("Invalid number", vbExclamation + vbRetryCancel, "")
If answer = vbCancel Then Exit Sub
GoTo query
End If
End Sub
Can you confirm that this isn't overly 'sloppy' in terms of coding? As a newbie I feel as though I could run into problems down the track if my code is scratchy.
Bookmarks