newclasshero
New Member
- Joined
- Sep 1, 2006
- Messages
- 46
I have a command button linked to this macro. It will print my Cheque Requisition forms except if the Invoice Number is mising from "B90". However it does not seem to want to run. Here it is:
Private Sub CommandButton3_Click()
If Sheets("Voucher").Cell("B90") >= 0 Then
Sheets("Voucher").Range("A64:J94").Select
Selection.PrintOut Copies:=1, Collate:=True
If Sheets("Voucher").Cell("B90") = 0 Then
MsgBox ("Please Input Invoice #.")
End If
End Sub
It worked great for print the Document before I put in the if statement and MsgBox info.
ps. I am not that familiar with MsgBox's and I think that may be why it is screwing up...
Private Sub CommandButton3_Click()
If Sheets("Voucher").Cell("B90") >= 0 Then
Sheets("Voucher").Range("A64:J94").Select
Selection.PrintOut Copies:=1, Collate:=True
If Sheets("Voucher").Cell("B90") = 0 Then
MsgBox ("Please Input Invoice #.")
End If
End Sub
It worked great for print the Document before I put in the if statement and MsgBox info.
ps. I am not that familiar with MsgBox's and I think that may be why it is screwing up...