API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.ParentGroup property
Returns a shape object that represents the group shape to which the active shape belongs to
Syntax:
Property Get ParentGroup() As Shape
Remarks:
The ParentGroup property returns a Shape object that represents the group shape to which the active shape belongs. If the shape is not part of a group, Nothing is selected.
Examples:
The following VBA example extracts an object from a group and places it at the same level as the group object.
Sub Test()
Dim s As Shape, g As Shape
Set s = ActiveShape
If s Is Nothing Then
  MsgBox "Please select an object", vbCritical
  Exit Sub
End If
Set g = s.ParentGroup
If g Is Nothing Then
  MsgBox "Please select an object within a group", vbCritical
  Exit Sub
End If
ActiveDocument.PreserveSelection = False
g.CreateSelection
g.Ungroup
s.Selected = False
ActiveSelection.Group
s.CreateSelection 
End Sub