Move to next unprotected cell

  • Thread starter Thread starter SouthAfricanStan
  • Start date Start date
S

SouthAfricanStan

Windows XP ,Office 2003
I have designed a form in which certain cells are protected.
In some rows there is more than one unprotected cell, in others, only one
unprotected cell.
After entering data in an unprotected cell, pressing the 'Enter' key causes
the curser to move to the first unprotected cell in the next row, whereas I
require the curser to move to the next unprotected cell on the same row -
and only moving to the next row when all cells on that row have been
completed.
How do I achieve this requirement?
 
One way would be to use a worksheet_change event where you would not need to
protect. Right click sheet tab>view code>insert this>adjust mc num to
suit>SAVE

Private Sub Worksheet_Change(ByVal Target As Range)
mc = 6
With Target
If .Column > mc Then Exit Sub
If .Column = mc Then .Offset(1, -mc + 1).Select
If .Column < mc Then .Offset(, 1).Select
End With
End Sub
 
Stan,

Try using Tab instead of Enter.
--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
 
Tools>Options>Edit>Move selection anfter Enter.

Check "Right"


Gord Dibben MS Excel MVP
 
Back
Top