R
Rookie 1st class
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim MyResponse As WorksheetFunction
If Range("F31") = "" Then
Range("F31").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
ElseIf Range("D32") = "" Then
Range("D32").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
ElseIf Range("C33") = "" Then
Range("C33").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
If Response = vbNo Then
Exit Sub
End If
End If
End Sub
2.5 questions:
1. vbYes works fine... I want to cancel print job (return to edit) if
response is vbNo.
2. Instead of 3 message boxes (one for each range checked), can I use one
message box? If Yes how?
Thanks
Lou
Dim MyResponse As WorksheetFunction
If Range("F31") = "" Then
Range("F31").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
ElseIf Range("D32") = "" Then
Range("D32").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
ElseIf Range("C33") = "" Then
Range("C33").Select
Response = MsgBox(Prompt:="Did you leave this blank
intentionally?", Buttons:=vbYesNoCancel + vbDefaultButton1, Title:="; BLANK?;
")
If Response = vbNo Then
Exit Sub
End If
End If
End Sub
2.5 questions:
1. vbYes works fine... I want to cancel print job (return to edit) if
response is vbNo.
2. Instead of 3 message boxes (one for each range checked), can I use one
message box? If Yes how?
Thanks
Lou