+ Reply to Thread
Results 1 to 6 of 6

Hitting Enter in an unlocked cell without it advancing to the next unlocked cell

  1. #1
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Hitting Enter in an unlocked cell without it advancing to the next unlocked cell

    Good Morning everyone.

    I have a locked spreadsheet with unlocked cells and checkboxes. The unlocked cells is for the user to enter text. The user navigation is top to botton in column a in sequential order by row.

    For example: I have an unlocked cell in A1, then 20 checkboxes from A2:A21 and then another unlocked cell in A22. My problem is that when the user types text in A1 and hits ENTER - the cursor jumps to A22 (the next unlocked cell and scrolls the screen down accordingly. The user then has to scroll back up to select the checkbox in A2 and so on down to A22 before typing in A22. I have created a command button that floats...that ultimately I would like the user to be able to select after typing in an unlocked cell(instead of hitting ENTER) and it removes the cursor from the unlocked cell - leaving the text entered - freeing the user to select checkboxes because excel didn't advance to the next unlocked cell.

    Any suggestions on how to do make the command button do this?
    Last edited by GuruWannaB; 11-06-2008 at 02:13 PM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    Put this code in your workbook project

    Please Login or Register  to view this content.
    To stop the enter key moving the cursor
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    It still moves from one unlocked cell to the next upon selecting the ENTER key after typing in input. The code above doesn't seem to work.

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    Sweep's solution works fine. Did you right click the Excel icon next to the File menu, View Code, and paste it there? Since it is an open event, it will not execute until you close and open the file or play it manually.

  5. #5
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421
    Quote Originally Posted by Kenneth Hobson View Post
    Sweep's solution works fine. Did you right click the Excel icon next to the File menu, View Code, and paste it there? Since it is an open event, it will not execute until you close and open the file or play it manually.
    There we go...no...I had opened the VBE, clicked on workbook and put it in there...but your way and his code...perfect! Thanks!!

  6. #6
    Registered User
    Join Date
    10-15-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Hitting Enter in an unlocked cell without it advancing to the next unlocked cell

    It does not work in protected mode

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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