mulitple checkboxes - changing value of all of them at once
I think you have to loop through them set them to false one at a time:
Sub UnCheck()
Dim ob As OLEObject
For Each ob In ActiveSheet.OLEObjects
If TypeName(ob.Object) = "CheckBox" Then
ob.Object.Value = False
End If
Next ob
End Sub
Hope this helps
Rowan
"nathan" wrote:
Hello,
I have mulitple checkbox controls (selected from the "control" toolbar) on
one worksheet. I would like to set the state of each checkbox to unchecked
all at once. I have figured out how to select all the checkboxes at one time
using:
ActiveSheet.OLEObjects.Select
But I cannot figure out how to change the value of all of them to "false".
I have tried, with no luck:
Selection.Value = false
Selection.oleobjects.Value = false
Selection.oleobjects.object.Value = false
etc
etc
Anyone how to do this?
Thanks.
|