Bert,
Again, you could run an on entry macro to determing the index number of the
field you just entered and then use that value in the on exit event.
However, I still don't see how you are going to be able to use the "same"
macro in all of your fields (in one instance you want to set the value of
check11 and in another you want to check the value of check 12) unless there
is exactly 10 fields between each pair (i.e., check1 always sets check11,
check 2 always sets check12 ... check100 always sets check110, etc.) in that
case, I suppose that you could use something like:
Sub RunOnEntry()
ActiveDocument.Variables("Index").Value = _
ActiveDocument.Range(0,
Selection.Bookmarks(1).Range.End).FormFields.Count
End Sub
Sub RunOnExit()
Dim oFrmFld As FormFields
Dim i As Long
i = CStr(ActiveDocument.Variables("Index").Value)
Set oFrmFld = ActiveDocument.FormFields
If oFrmFld(i).CheckBox.Value = True Then
i = i + 10
oFrmFld(i).CheckBox.Value = True
Else
i = i + 10
oFrmFld(i).CheckBox.Value = False
End If
End Sub