~KO said:
I am trying to do a macro that will automatically check boxes 17 and
20 if 5,6, or 7 are checked. Any simple solutions? I have Word 2000.
You really haven't given enough information, so I'll make these assumptions:
- The check boxes are form fields (from the Forms toolbar) in a protected
template.
- The name of each check box, as shown in its Properties dialog, is "Check"
plus the number you've given, such as "Check5". This is the default name
Word gives when you insert a check box.
In that case, paste this code into a module in the template:
Sub ExitCheck()
With ActiveDocument
If .FormFields("Check5").CheckBox.Value Or _
.FormFields("Check6").CheckBox.Value Or _
.FormFields("Check7").CheckBox.Value Then
.FormFields("Check17").CheckBox.Value = True
.FormFields("Check20").CheckBox.Value = True
Else
.FormFields("Check17").CheckBox.Value = False
.FormFields("Check20").CheckBox.Value = False
End If
End With
End Sub
Then go to the Properties dialogs of check boxes 5, 6, and 7, pull down the
Exit dropdown, and select ExitCheck for each one.
If the check boxes are from the Control Toolbox or in a userform (custom
dialog), post back for different instructions.