Share via


Worksheet.EnableSelection Property

Definition

Gets or sets a value indicating which cells can be selected on the sheet.

public Microsoft.Office.Interop.Excel.XlEnableSelection EnableSelection { get; set; }

Property Value

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.

Applies to

Product Versions
Visual Studio Tools for Office 2017, 2019, 2022