Gets or sets the value which specifies what can be selected on the sheet.
[Visual Basic] Property EnableSelection As XlEnableSelection [C#] XlEnableSelection EnableSelection { get; set; } [C++] __property XlEnableSelection get_EnableSelection(); __property void set_EnableSelection(XlEnableSelection ); [JScript] function get EnableSelection() : XlEnableSelection function set EnableSelection(XlEnableSelection);
XlEnableSelection enumeration.
This property takes effect only when the worksheet is protected.
This example sets worksheet one so that nothing on it can be selected.
[C#]
book.Worksheets[1].EnableSelection = XlEnableSelection.xlNoSelection;
book.Worksheets[1].Protect();
[Visual Basic]
book.Worksheets(i).EnableSelection = XlEnableSelection.xlNoSelection
book.Worksheets(i).Protect()
[C++]
book->Worksheets->Item[i]->EnableSelection = XlEnableSelection::xlNoSelection;
IWorksheet Interface | NativeExcel Namespace | Protect Method