API Documentation > CorelDRAW > 2025-v26 > Application > IVGApplication
Application.ActiveSelectionRange property
Gets the active selection range
Syntax:
Property Get ActiveSelectionRange() As ShapeRange
Remarks:
The ActiveSelectionRange property returns the active ShapeRange object in the active document.
Examples:
The following VBA example displays messages about selected objects in the active document, depending on the number of objects selected.
Sub SelectionRangeActive()
If ActiveSelectionRange.Count = 1 Then
  MsgBox "There is only one shape selected in the shape range."
ElseIf ActiveSelectionRange.Count = 0 Then
  MsgBox "There are no shapes selected in the shape range."
Else
  MsgBox "There are " & ActiveSelectionRange.Count & " shapes in the selected shape range."
End If 
End Sub