Re: Disallow printing if amount of check request exceeds amo
Thanks Everyone! What a great prompt response. Well, I tried what Mudface suggested and got an error. Check this out...
Private Sub Workbook_BeforePrint()
'This macro will not allows request to print without completed cells
If Range("f16") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT MANAGERIAL APPROVAL - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("f10") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT NAME OF REQUESTOR - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("f12") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT PURPOSE OF CHECK REQUEST - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("f14") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT DATE OF APPROVAL - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("B8") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT NAME OF PAYEE - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("B10") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT ADDRESS - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("B12") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT CITY ADDRESS - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("B14") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT STATE ADDRESS - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("B16") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT ZIP ADDRESS - PLEASE COMPLETE", vbCritical
Cancel = True
If Range("C24:K24") <> 1 Then
MsgBox "CHECK REQUEST WILL NOT PRINT WITHOUT DEBIT AMOUNT - PLEASE COMPLETE", vbCritical
Cancel = True
End If
End Sub
The error I received was a Compile Error: Procedure declaration does not match description of event or procedure having the same name.
Got any ideas?