Microsoft KB Archive/61939

{|
 * width="100%"|

Unusual Results with SELECT Function in Protected Document

 * }

-

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(,&quot;RC[1]&quot;) SELECT(,&quot;RC[-1]&quot;) SELECT(,&quot;R[1]C&quot;) SELECT(,&quot;R[-1]C&quot;)

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.