define cell

S

Sanjiv

Hello,

I want to enter, say 2 char in a cell and then want to jump to the next cell
on the right without having to press enter key. Possible ?

thnx.
Sanjiv.
 
G

Gord Dibben

Not possible.

Excel has no way of knowing when you are finished editing that cell until
you indicate by moving out of that cell.

VBA code will not run while in Edit mode.


Gord Dibben MS Excel MVP
 
G

Gary''s Student

Put the following macros in a standard module:

Sub onn()
Application.OnKey "2", "MyMacro"
End Sub

Sub offf()
Application.OnKey "2"
End Sub

Sub MyMacro()
ActiveCell.Value = 2
ActiveCell.Offset(0, 1).Select
End Sub

First run onn. From then on, if you touch the 2 key, a 2 will be entered in
the active cell and selection will move one cell to the right.

To cancel, run offf.
 
Top