View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Get the name of a group given the reference to a shape within the group

Maybe you can use the ParentGroup object. For example:

Sub a()
Dim Sh As Shape
Dim Sh1 As Shape
On Error Resume Next
For Each Sh In ActiveSheet.Shapes
If Sh.Connector = msoTrue Then
Err.Number = 0
Set Sh1 = Sh.ConnectorFormat.BeginConnectedShape
If Err.Number < 0 Then GoTo NextShape
Debug.Print Sh1.ParentGroup.Name
If Err.Number = 0 Then GoTo NextShape
Debug.Print Sh1.Name
End If
NextShape:
Next
End Sub


--
Jim Rech
Excel MVP