Using Checkboxes in Word
I'm wondering if someone out there can help me with my code. I have written a code that is supposed to determine if a checkbox has been checked in the document, then add 1 to the counter. It has been a few years since I tried to write any sort of code, so I have a feeling my problem may be relatively simple. I get a runtime error 438 when I try and run the code.
Sub addcheck()
Dim counter As Integer
counter = 0
With ActiveDocument
If .formfieldscheck1066.Checked = True Then
counter = counter + 1
End If
If .FormFieldscheck1070.Result = True Then
counter = counter + 1
End If
If .FormFieldscheck1074.Result = True Then
counter = counter + 1
End If
.formfieldstext819.Result = counter
End With
End Sub
Thanks!
|