VBA for Conditional print

[Closed]
Report
Posts
3
Registration date
Wednesday February 8, 2012
Status
Member
Last seen
December 13, 2013
-
Hi all,
I have a word file which includes some check boxes.
I need a VBA code that forbid the user to print the active document if he didn't checked at least one of the check boxes.

I used the following code but didn't work:

Sub ActiveDocument_BeforePrint(Cancel As Boolean)
If CheckBox1 = False Then
Cancel = True
MsgBox "You have to check/choose at least on of the options in order to be able to print it, thank you!", vbExclamation, "Finance Section"
End If
End Sub

Thanks a lot in advance for any kind help or assistance!
Best regards,
Issa