+ Reply to Thread
Results 1 to 16 of 16

Automatically move cursor to next unprotected cell

  1. #1
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Automatically move cursor to next unprotected cell

    Greetings:

    I'm sure there must be a way to format my worksheet so that when I enter a single number (0-9) into selected cells my cursor would advance automatically to the next unprotected cell to the right without having to use the tab or arrow keys. Can anyone please help?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    In the Sheet module:

    Please Login or Register  to view this content.
    In a code module:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    Thanks Shg, but I can't get it to work

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    That's not very self-helpful. Exactly what did you do to install and test it?

  5. #5
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    This is what I would like to occur on one worksheet:
    Starting in cell E4 I would like to enter a number (0-9) and I would like to automatically advance to E5 without using tab or arrows. Continuing to cell M4 I would then like to advance to O4 (since N4 contains a sum formula, and is protected). I would then like the same functions in cell O4:W4. I think I would be able to then adapt the formula to the same cells in row 5, 6, & 7. I am sorry but I am relatively new to this and hope that I explained it okay.

  6. #6
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    I'm sorry I meant advance to F4 (not E5) in the first sentence.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    OK. So right now the code is set for single-digit entry in columns C through I. Did you get that to work? And again, what did you do to install the code?

  8. #8
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    I right clicked on the sheet tab, view code, and pasted the sheet module. Then I tried highlighting the cells and doing the same thing with the code module. Probably wrong I guess.

  9. #9
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    I continue to get errors. A more specific installation method would be helpful.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    See attached. The sheet is protected (as it need be for the behavior you want) with no password. Formula cells must be locked, data entry cells unlocked.

    Change this line

    Please Login or Register  to view this content.
    to change the range of cells in which the single-digit entry is performed.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    Here is the worksheet I am using. I would like to enter the numbers in the gray areas with the cursor advancing automatically to each next cell.
    Attached Files Attached Files

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    Did you try what I posted?

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatically move cursor to next unprotected cell

    See attached.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Automatically move cursor to next unprotected cell

    Thanks for trying to help me out. I had to rush to work earlier, sorry. I see the code in the form you sent back to me, but it still doesn't do the trick. It will not advance after I enter the number. Interesting enough, when I go to delete each number it will automatically advance to the next cell so I do not have to use the tab or arrow keys to move. This is the same function I want it to do when I enter data.

  15. #15
    Registered User
    Join Date
    05-25-2020
    Location
    St. Louis, MO
    MS-Off Ver
    office 365
    Posts
    5

    Re: Automatically move cursor to next unprotected cell

    shg, I am trying to do the same thing as thedunna. I downloaded scratch.xlsm and tried using your spreadsheet but the cell advance feature doesn't work. I am not getting an error. I will tell you that I downloaded it multiple times and one time it worked but I cannot get it to repeat.

  16. #16
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Automatically move cursor to next unprotected cell

    Quote Originally Posted by Birdman716 View Post
    shg, I am trying to do the same thing as thedunna. I downloaded scratch.xlsm and tried using your spreadsheet but the cell advance feature doesn't work. I am not getting an error. I will tell you that I downloaded it multiple times and one time it worked but I cannot get it to repeat.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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