API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.CreateSelection method
Creates a selection from a shape
Syntax:
Sub CreateSelection()
Remarks:
The CreateSelection method selects a shape, automatically deselecting all other shapes on the page. See also the Shape.Selected property.
Examples:
The following VBA example selects a shape with the name MyRectangle.
Sub Test()
Dim s As Shape
Set s = ActivePage.FindShape("MyRectangle")
If Not s Is Nothing Then
  s.CreateSelection
Else
  ActiveDocument.ClearSelection
End If 
End Sub