Hello,
I'm trying to create a form that cannot be printed unless certain fields are filled in (A1, B19 & B45).
Been using VBA and found this online:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Sheets("Cover Sheet").Range("A1,B19,B45").Value = "" Then
Cancel = True
MsgBox ("Please complete all required fields prior to printing.")
End If
End Sub
If works, however it only works if A1 is not filled in.
Any help you can provide would be greatly appreciated.
Thank you.
I'm trying to create a form that cannot be printed unless certain fields are filled in (A1, B19 & B45).
Been using VBA and found this online:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Sheets("Cover Sheet").Range("A1,B19,B45").Value = "" Then
Cancel = True
MsgBox ("Please complete all required fields prior to printing.")
End If
End Sub
If works, however it only works if A1 is not filled in.
Any help you can provide would be greatly appreciated.
Thank you.