Sam Pickard
New Member
- Joined
- Apr 9, 2012
- Messages
- 12
I have 32 checkboxes in a few different groups, each box is named EasyReviewXXXXXCheckbox where the Xs is a different 5 letter code for each box. I'm trying to find a way to reference them using a variable without ungrouping them. The code below seems to skip over any objects that are grouped, I know that if need be I can just ungroup them but If there's an easy way to include grouped objects I would much rather keep them together. Thanks in advance for any help.
Code:
Sub test()
Dim obj As Object
With ActiveSheet
For Each obj In .OLEObjects
If Left(obj.Name, 10) = "EasyReview" And Right(ct.Name, 5) = "Check" Then MsgBox (Mid(ct.Name, 10, 5))
Next obj
End With
End Sub