+ Reply to Thread
Results 1 to 4 of 4

Disabling the Enter Key

  1. #1
    Registered User
    Join Date
    02-07-2013
    Location
    Hatfield Heath, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Disabling the Enter Key

    Hi
    I have a form with several unlocked cells, some of which are horizontal to each other and others directly below. Navigating through with the Tab key is ideal, but the Enter key will drop down a row rather than tab to the next field. I would like to disable the Enter key to prevent users from being able to do that.

    I have the following codes at ThisWorkbook level
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    I find that when I enter data into a cell and press the enter key nothing happens, but if I press the enter key again then cursor moves to the next cell down.
    All of the cells in my worksheet are locked except the following (some of which are merged)
    E6, E8, D15, F15, D22, F22, D35, F35, D41, F41, D47, F47, D57, F57, D67, F67, D79, D90, E94, G94, and I want to tab through them in that order.

    Any ideas anyone please?
    Ernie
    Last edited by 6StringJazzer; 06-10-2021 at 01:47 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Disabling the Enter Key

    Give this try:

    Please Login or Register  to view this content.
    to turn it back on

    Please Login or Register  to view this content.
    Found here:
    https://www.mrexcel.com/board/thread...running.77758/
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  3. #3
    Registered User
    Join Date
    02-07-2013
    Location
    Hatfield Heath, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Disabling the Enter Key

    Thanks cubangt
    also adding a msbox "Please use Tab between cells" in the first routine works just fine. I haven't yet worked out how the second sub works when it has the same name.
    Regards
    Ernie

  4. #4
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Disabling the Enter Key

    Should work by changing the name, i didnt realize when i copied it..i think all that matters is the logic within, call it within your logic as needed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] If cell meets date requirement enter 1, if not enter 0, if blank don't enter anything.
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-11-2017, 02:04 PM
  2. Replies: 1
    Last Post: 03-25-2016, 01:31 AM
  3. Replies: 1
    Last Post: 03-25-2016, 01:16 AM
  4. Replies: 4
    Last Post: 12-23-2015, 03:03 AM
  5. [SOLVED] How to increase/decrease numbers using keystrokes enter/shift+enter?
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-12-2014, 05:57 AM
  6. Replies: 5
    Last Post: 12-06-2010, 04:39 PM
  7. [SOLVED] enter a product numbinfo in cel needs to propt other cels to automatically enter text
    By Bill W in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-03-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1