XL: EnableSelection Property May be OverriddenLast reviewed: February 4, 1998Article ID: Q157102 |
The information in this article applies to:
SYMPTOMSIf you use the EnableSelection property of a worksheet to restrict certain cells from being selected, you may still be able to select the restricted cells. For example, if you use the following code to prevent selection of locked cells:
ActiveSheet.EnableSelection = xlUnlockedCellsit may still be possible to select locked cells.
CAUSEThis occurs because the EnableSelection property does not prevent you from selecting cells using the Name box on the Formula bar. Also, you can use a macro to select cells, even if they are locked, by using a line of code similar to the following:
Range("B5").Select RESOLUTIONEven though you can select restricted cells, if the cells are locked and the worksheet is protected, you cannot change them.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONYou can use the EnableSelection property of a worksheet to determine what, if any, cells on a worksheet may be selected by the user. EnableSelection has three possible values:
Value Definition --------------------------------------------------------------------- xlNoRestrictions Any cell can be selected. xlNoSelection No cells can be selected. xlUnlockedCells If the worksheet is protected, only cells that are unlocked can be selected.You can unlock a cell or group of cells by following these steps:
However, you can select locked cells by using the Name box on the Formula bar. If you click the Name box, type in a cell reference (D5, for example) or a range reference (D5:E10, for example), and then press Enter, the indicated cell or range will be selected. Because the cells are locked and the worksheet protected, they cannot be changed. You can still copy or fill from a locked cell into unlocked cells without receiving any error messages.
|
Additional query words: XL97 XL98 vba vbe
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |