What Instruction?

J

johnsail

Have a sheet where all cells locked except col A.
If a value is entered in A I unlock cell in col C.
However the cursor mpoves to col A on the next line rather than to the newly
unlocked cell on the same line.
What instruction moves the cursor to cell in col C?

John
 
A

Aviral Sharma

HI John


If you are working on Excel 2007, You can change the cursor movement as per
your choice.
Click on the Windows button on the top left corner and choose "Excel Options"
now click on "Advanced" tab and you will find the option to change cursor
movement under Editing Options. Here you can specify the cursor to move to
the cell in right side instead of down.

Pls click yes if it helps.

Avi
 
G

Gary''s Student

Put this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rc As Range
Set t = Target
Set ra = Range("A:A")
If Intersect(t, ra) Is Nothing Then Exit Sub
Set rc = t.Offset(0, 2)
rc.Locked = False
rc.Select
End Sub
 
J

johnsail

Hi Avi

Am using Excel 2003 SP3. The unlocking of cells isbeing done by VB and
changing the cursor direction makes no difference.

John
 
Top