-
The BeforePrint event must look like this:
[VBA]Private Sub Workbook_BeforePrint(Cancel As Boolean)
End Sub
[/VBA]
In the VBEditor, if you choose Workbook from the left dropdown at the top of the main code window, the right dropdown contains a list of events; picking one will create a stub procedure with the right format.
All you would do with your print to PDF routine is add the check near the beginning like this:
[VBA]If Sheets("signatures and pricing").[g2] = "" Then
MsgBox "You need to fill in cell G2!"
Exit Sub
End If[/VBA]
HTH
Rory
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules