Thread
:
Find checkboxes and then check them
View Single Post
#
4
Posted to microsoft.public.excel.programming
Nigel[_2_]
external usenet poster
Posts: 735
Find checkboxes and then check them
sorry code to do it......
Sub FindCheckboxes()
Dim obj As OLEObject
With Sheets("Sheet1")
For Each obj In .OLEObjects
If TypeOf obj.Object Is MSForms.CheckBox Then
obj.Object.Value = True
End If
Next obj
End With
End Sub
--
Regards,
Nigel
"ExcelMonkey" wrote in message
...
I am trying to loop through all the checkbox controls in a spreadsheet and
make sure they are all checked. Why is this not workin:
Sub FindCheckboxes()
Dim obj As OLEObject
For Each obj In OLEObjects
If TypeOf obj.Object Is msforms.CheckBox Then
obj.Object.Value = True
End If
Next obj
End Sub
Thanks
EM
Reply With Quote
Nigel[_2_]
View Public Profile
Find all posts by Nigel[_2_]