Previous Document Next Document

Object Model Reference : Classes : A : Application : Properties : Application.ActiveSelectionRange


Application.ActiveSelectionRange

Property ActiveSelectionRange As ShapeRange

Description

Member of Application

The ActiveSelectionRange property returns the active ShapeRange object in the active document.

The ActiveSelectionRange property returns a read-only value.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.