Macro to toggle move selection after entry direction

T

Tonso

Using XL2002, I have a form to fill in which requires the entry of
quite a few numbers. The form is designed so the numbers are entered
acrross columns instead of down rows. It would speed up the entry if i
could enter a number, then press "Enter", and have the cell to the
right selected instead of the cell below. Is there a macro where i can
toggle between moving the selection right or moving it down? It would
sure speed up my work!
Thanks...
Tonso
 
M

Mais qui est Paul

Bonsour® Tonso avec ferveur ;o))) vous nous disiez :
Using XL2002, I have a form to fill in which requires the entry of
quite a few numbers. The form is designed so the numbers are entered
acrross columns instead of down rows. It would speed up the entry if i
could enter a number, then press "Enter", and have the cell to the
right selected instead of the cell below. Is there a macro where i can
toggle between moving the selection right or moving it down? It would
sure speed up my work!

Application.MoveAfterReturnDirection = xlDown
' ---- (or xlUp, xlToRight, xlToLeft)
 
T

Tonso

Bonsour® Tonso  avec ferveur  ;o))) vous nous disiez :


Application.MoveAfterReturnDirection = xlDown
' ---- (or xlUp, xlToRight, xlToLeft)

I am sorry. i should have been more specific. I want a macro to TOGGLE
from DOWN to RIGHT and vice versa. I plan on putting an icon on my
toolbar so I can change the direction to RIGHT, then toggle it back to
DOWN. There are parts of the form where the data is entered "down",
and other parts where it is entered "right". Thank you for the quick
repsonses so far!
Tonso
 
M

Mais qui est Paul

Bonsour® Tonso avec ferveur ;o))) vous nous disiez :
I am sorry. i should have been more specific. I want a macro to TOGGLE
from DOWN to RIGHT and vice versa. I plan on putting an icon on my
toolbar so I can change the direction to RIGHT, then toggle it back to
DOWN.

;o)))
not too smart programming ?

If Application.MoveAfterReturnDirection = xlDown then
Application.MoveAfterReturnDirection =xlToRight
Else
Application.MoveAfterReturnDirection =xlDown
End if
 
T

Tonso

Bonsour® Tonso  avec ferveur  ;o))) vous nous disiez :


;o)))
not too smart programming ?

 If Application.MoveAfterReturnDirection = xlDown then
    Application.MoveAfterReturnDirection =xlToRight
Else
    Application.MoveAfterReturnDirection =xlDown
End if

Thanks! That is what I needed! No, I am not too smart programming,
thats why I needed some collaboration.

Tonso
 

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