ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
I would like my code to check for a value in cell N18 before printing.
No value then do not print.
If there is a value then continue to print.
The code in use is shown below.
I leave the cell empty.
I see the msgbox.
I click on OK
Printing then continues.
What did i miss thanks.
I would like my code to check for a value in cell N18 before printing.
No value then do not print.
If there is a value then continue to print.
The code in use is shown below.
I leave the cell empty.
I see the msgbox.
I click on OK
Printing then continues.
What did i miss thanks.
Code:
Private Sub Print_One_Invoice_Click()
If Range("N18") = "" Then
MsgBox ("PLEASE SELCT A PAYMENT TYPE "), vbCritical
Else
End If
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub