Compartilhar via


_Worksheet.EnableSelection Property

Returns or sets what can be selected on the sheet. Read/write XlEnableSelection.

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

Syntax

'Declaration
Property EnableSelection As XlEnableSelection
    Get
    Set
'Usage
Dim instance As _Worksheet
Dim value As XlEnableSelection

value = instance.EnableSelection

instance.EnableSelection = value
XlEnableSelection EnableSelection { get; set; }

Property Value

Type: Microsoft.Office.Interop.Excel.XlEnableSelection

Remarks

This property takes effect only when the worksheet is protected: xlNoSelection prevents any selection on the sheet, xlUnlockedCells allows only those cells whose Locked property is False to be selected, and xlNoRestrictions allows any cell to be selected.

See Also

Reference

_Worksheet Interface

_Worksheet Members

Microsoft.Office.Interop.Excel Namespace