API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.Group method
Creates a group of selected Objects
Syntax:
Function Group() As Shape
Remarks:
The Group method groups the shapes that are part of the current shape and returns the group. This method is applicable for selection shapes only (that is, shapes whose Shape.Type property is cdrSelectionShape).
Examples:
The following VBA example groups the current selection and moves the group to the current layer.
Sub Test()
Dim g As Shape
Set g = ActiveSelection.Group
g.Layer = ActiveLayer 
End Sub