Worksheet.EnableSelection Property
Gets or sets a value indicating which cells can be selected on the sheet.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Property EnableSelection As XlEnableSelection
Get
Set
XlEnableSelection EnableSelection { get; set; }
Property Value
Type: Microsoft.Office.Interop.Excel.XlEnableSelection
One of the XlEnableSelection values.
Remarks
This property takes effect only when the worksheet is protected: xlNoSelection prevents any selection on the sheet, xlUnlockedCells allows only those cells that are not locked to be selected, and xlNoRestrictions allows any cell to be selected.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.