Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to make the movement of key

Status
Not open for further replies.

bnageshrao

Programmer
Mar 17, 2001
83
US
I want to make the movement of key horizontal(moving to the right) when using the "Enter" Key. I used the options and settings and it works for fine. But this is user specific and not program specific. Can we write a code for the movement to be horizontal no matter what is the setting in Options submenu? Also when the cursor is in the last cell of the row is it possible to make it to go to the first cell of the next row when you press 'Enter' Key. If any body can help me on this I will be really thankful. Thanks in advance.
 

bnageshrao
:

Put the following code in any workbook and it will change the Enter direction to move to the right instead of down. Put this code in your Personal.xls file to make it happen whenever Excel opens.
[tt]
Sub Auto_Open()
Application.MoveAfterReturnDirection = xlToRight
End Sub
[/tt]

Regards,

LoNeRaVeR
 
The problem is I want to finish this spread sheet and send it to different sites. If I can write a code right in my application to achieve the movement of the cursor to the right then it will be great then users dont have to do anything with their machine by putting those code in personal.xls. So anyother way?
 

bnageshrao
:

It will still work, just put this line at the beginning of your code:
[tt]
Application.MoveAfterReturnDirection = xlToRight
[/tt]

Regards,

LoNeRaVeR

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top