Thread: Group controls
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Group controls

Use the macro recorder to get syntax how to group your textboxes (edit the
recorded macro of unnecessary "Selects" etc). Then to refer to grouped items
within the group-

Sub test()
Dim gpItem As Object

Set shp = ActiveSheet.Shapes("Group 3")
If shp.Type = msoGroup Then
For Each gpItem In shp.GroupItems
'Debug.Print gpItem.Name
Msgbox gpItem.Name
Next
End If
End Sub

If you have sub-groups within a group would need a recursive type function.

Regards,
Peter T

"stefantem" wrote
in message ...

How can I group some textboxes and refer each element of group?


--
stefantem
------------------------------------------------------------------------
stefantem's Profile:

http://www.excelforum.com/member.php...o&userid=13594
View this thread: http://www.excelforum.com/showthread...hreadid=500081