Share via


_Application.Selection Property

Returns the selected object in the active window.

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

Syntax

'Declaration
ReadOnly Property Selection As Object
    Get
'Usage
Dim instance As _Application
Dim value As Object

value = instance.Selection
Object Selection { get; }

Property Value

Type: System.Object

Remarks

The returned object type depends on the current selection (for example, if a cell is selected, this property returns a Range object). The Selection property returns Nothing if nothing is selected.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Excel Namespace