deadseasquirrels
Board Regular
- Joined
- Dec 30, 2004
- Messages
- 232
I created a bunch of check boxes and put them on an excel sheet. They are just free floating in there, without a userform. Now I want to loop through every single checkbox to uncheck them all. But using something like what's shown below
but I don't know what the parent is...in the above code I have Me...referring to a userform it would typically be in, but obviously that's not the case here. Then I tried sheets(1) but that's not the parent either. Does anybody know how I can access the parent to all these checkboxes?
Code:
For Each ctl In Me.Controls
If TypeOf ctl Is MSForms.Checkbox Then
' do something
MsgBox ctl.Caption
End If
Next ctl
but I don't know what the parent is...in the above code I have Me...referring to a userform it would typically be in, but obviously that's not the case here. Then I tried sheets(1) but that's not the parent either. Does anybody know how I can access the parent to all these checkboxes?