Share via


Window.Selection Property

Returns the selected object in the specified 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 Window
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.

Using this property with no object qualifier is equivalent to using the Selection property of the Application object.

See Also

Reference

Window Interface

Window Members

Microsoft.Office.Interop.Excel Namespace