Move to next unprotected cell

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?
 
D

Don Guillett

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
 
E

Earl Kiosterud

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...
 
G

Gord Dibben

Tools>Options>Edit>Move selection anfter Enter.

Check "Right"


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top