first go around inputbox
Try modifying your code to add this stuff (I'm showing complete routine but
it doesn't include your With/End With and .Select and Printout statements,
which you need to add back in).
Sub TestInputBox()
Dim pCnt As Integer
On Error Resume Next
pCnt = InputBox("Enter # of copies", , 0)
If Err < 0 Then
'they hit [Cancel]
Err.Clear
On Error GoTo 0
Exit Sub
End If
On Error GoTo 0
'didn't hit [Cancel] but pCnt may be zero
If pCnt 0 Then
'do your printout command here
End If
End Sub
"Curt" wrote:
Found out when testing I didn't get all needed. What I've got works unless
you hit cancel or enter 0 Following is what I've done seems all I find goes
to a greater extent than I need. All help greatly appreciated.
Following is what iI've got
Thanks to All
With Sheets("Check_In")
Sheets("Check_In").Select
pCnt = InputBox("How Many Copies") '2
ActiveWindow.SelectedSheets.PrintOut Copies:=Val(pCnt), Collate:=True '2
.pagesetup.PrintArea = "A2:D" & Cells(Rows.Count, "B").End(xlUp).Row
End With
|