Worksheet.EnableSelection procedure builder

Worksheet.EnableSelection (Excel)

Returns or sets what can be selected on the sheet.

Possible Values are xlNoRestrictions - Anything can be selected, xlNoSelection - Nothing can be selected, xlUnlockedCells - Only unlocked cells can be selected.

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.

ActiveSheet.EnableSelection = xlNoRestrictions