Can I make the "Enter" key behave like the "Tab" key?

bobmc

Board Regular
Joined
Mar 13, 2002
Messages
142
I've built a nice spreadsheet that utilizes merged cells of different widths, horizontal positions, etc. Entering a value into a given cell, then pressing the "Enter" key rather than the "Tab" key creates problems in parts of the navigation...but I'd like to give the user the option of using the "Enter" key if they'd like. Soooo...

Can I make the "Enter" key behave like the "Tab" key?

Any help would be greatly appreciated!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
put in 'thisworkbook' object of your workbook:

Private Sub Workbook_Activate()
Application.MoveAfterReturnDirection = xlToRight
End Sub

Private Sub Workbook_Deactivate()
Application.MoveAfterReturnDirection = xlDown
End Sub

Aloha!
 
Upvote 0
Hey Hawaiian...

Thanks for your quick reply! Unfortunately, I did exactly as you suggested and it didn't work. (Tried it in a new xls as a test.) Double-checked to make sure I put it in "This Workbook". Cut and pasted your code, so I didn't make a typo.

Any customization I should be filling in? I'm fairly certain this is an "E-S-O" as it pertains to my lack of expertise when it comes to Excel coding!

Any further assistance would be pounced upon.

Thanks.
 
Upvote 0
bobmc,

I apologize. I'm sure that I didn't understand what you wanted to do, and just took for granted that you wanted the cell selection to go to the right when 'Enter' is pressed (as the 'Tab' key does) instead of downward, which is the default direction. Is that correct?
 
Upvote 0
Yup. That's exactly right. I put the code into the "This Workbook" and when I went back to Sheet1 and pressed the "Enter" key, it still went to the cell below it instead of to the right. I also tried putting the code into the "This Sheet" object and had the same result.

Lemme know what you think.

Thanks!
 
Upvote 0
bobmc,

Did you save the workbook (with the code)? Try saving, closing, then re-opening it, or just open another workbook, then switch back to the workbook with the code in it. It should work okay, but let me know.
 
Upvote 0
Hey Hawaiian...

Well, that was it! It works! I do very much appreciate your help!

Mahalo.

bobmc
 
Upvote 0
Re: Can I make the "Enter" key behave like the "Tab" key?

I am new to this and I really want to use this function. Where exactly do I enter this in? I've tried doing further researching prior to posting this reply but I'm stuck. Help this dummy please? lol
 
Upvote 0
Re: Can I make the "Enter" key behave like the "Tab" key?

First you need to go to the VBA Panel to get started: press both keys Alt and F11 then you can follow the suggestions of the thread.
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,916
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top