_Application.PreviousSelections Property

Returns an array of the last four ranges or names selected. Each element in the array is a Range object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
ReadOnly Property PreviousSelections ( _
    Index As Object _
) As Object
    Get
'Usage
Dim instance As _Application
Dim Index As Object
Dim value As Object

value = instance.PreviousSelections(Index)
Object this[
    Object Index
] { get; }

Parameters

  • Index
    Type: System.Object

    Optional Object. The index number (from 1 to 4) of the previous range or name.

Property Value

Type: System.Object

Remarks

Each time you go to a range or cell by using the Name box or the Go To command (Edit menu), or each time a macro calls the Goto method, the previous range is added to this array as element number 1, and the other items in the array are moved down.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Excel Namespace