Unusual Results with SELECT Function in Protected Document

Last reviewed: November 2, 1994
Article ID: Q61939
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 5.0
  • Microsoft Excel for OS/2, versions 2.2, 2.21, and 3.0

SUMMARY

The following sequence of functions moves the active cell to the right, left, up, and down within the selection, just as the TAB, SHIFT+TAB, ENTER, and SHIFT+ENTER key sequences do:

   SELECT(,"RC[1]")
   SELECT(,"RC[-1]")
   SELECT(,"R[1]C")
   SELECT(,"R[-1]C")

However, these functions may react unpredictably if document contents are protected. When document contents are protected, pressing TAB and SHIFT+TAB makes the active cell go to the NEXT cell whose contents are unlocked (traveling from left to right, top to bottom).

To make the macro select a cell independent of cell protection, remove the leading comma from the function.

MORE INFORMATION

If all the cells are locked, pressing TAB and SHIFT+TAB prevents the active cell from moving. If some cells are locked and others are not, the TAB or SHIFT+TAB may cause the active cell to jump from an unlocked cell, across locked cells, and land on the next unlocked cell.

This type of behavior also is experienced if you use the above macro commands.

REFERENCES

"Microsoft Excel Functions and Macros," version 2.1, page 349

"Microsoft Excel Function Reference," version 3.0, page 210


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.00 2.0 2.01 2.1 2.10 2.2 2.21 2.20 3.00
3.0 4.00 4.0


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.