Hi macropod,
Thanks, it works perfect!
However, I have one more issue, which can't solve.
Code:
Private Sub Document_Close()
Select Case ActiveDocument.FormFields("drop").Result
Case "Internal"
If ActiveDocument.FormFields("mob_ph_check").CheckBox.Value = False And ActiveDocument.FormFields("broad_check").CheckBox.Value = False And ActiveDocument.FormFields("car_check").CheckBox.Value = False And ActiveDocument.FormFields("vsp_check").CheckBox.Value = False Then
MsgBox "Are you sure that contract should be without benefits?", vbOKOnly
Cancel = True
End If
Case "Permanent"
If ActiveDocument.FormFields("mob_ph_check").CheckBox.Value = False And ActiveDocument.FormFields("broad_check").CheckBox.Value = False And ActiveDocument.FormFields("car_check").CheckBox.Value = False And ActiveDocument.FormFields("vsp_check").CheckBox.Value = False Then
MsgBox "Are you sure?", vbOKOnly
Cancel = True
End If
End Select
End Sub
I used this code to run action. When I choose 'Internal' or 'Permanent' from formfield 'drop' and couple of checkboxes are not checked then want to close the file I get a message. And then I have a possibility to save file, don't save or cancel and back to file and continue filling form.
Is it possible to run the same action if I click 'Save' - little disk in the left upper corner?
Best regards,
AttiCuS