I created a form in Word 2010 using many ActiveX OptionButton controls across numerous GroupNames. After configuring all of the buttons I went through and tested them to make they were all grouped properly; now a third are set to "true", but I want them to all be set to "false" before I distribute the form. Right now, I'm just going into the VBA code and toggling each of them manually. Is there a better way to do toggle them all as a single macro?
I tried the following procedure
But it doesn't do anything. I also tried referencing oShape as an OptionButton, but that just generated a bunch of type mismatch errors.
I tried the following procedure
Code:
Sub Reset()
Dim oShape As Shapes
Set oShape = ThisDocument.Shapes
For i = 1 To oShape.Count
If oShape(i).OLEFormat.ClassType = "Forms.OptionButton.1" Then
If oShape(i).OLEFormat.Object.Value = True Then
oShape(i).OLEFormat.Object.Value = False
End If
End If
Next
End Sub
But it doesn't do anything. I also tried referencing oShape as an OptionButton, but that just generated a bunch of type mismatch errors.