J
John Excel
I have the following code in a spreadsheet but I get a run time error when it
reaches '(If Range("pxselect") > 0 Then)'.
Range 'pxselect' is a cell in the Customer Profile sheet. Please advise
where I am going wrong.
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Customer Profile").Range("newused") = 1
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Dan").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
If Range("pxselect") > 0 Then
Sheets("Handback").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
Also, how can I get a pop up message asking "Are you sure you want to print"
when the command button is clicked.
Thanks in advance of a favourable reply.
John Davies
reaches '(If Range("pxselect") > 0 Then)'.
Range 'pxselect' is a cell in the Customer Profile sheet. Please advise
where I am going wrong.
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Customer Profile").Range("newused") = 1
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Dan").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
If Range("pxselect") > 0 Then
Sheets("Handback").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
Also, how can I get a pop up message asking "Are you sure you want to print"
when the command button is clicked.
Thanks in advance of a favourable reply.
John Davies