Consulting

Results 1 to 5 of 5

Thread: VBA code for Cursor to stay Stationary in one cell

  1. #1

    VBA code for Cursor to stay Stationary in one cell

    I need a VBA code for one particular workbook to do the following on Sheet 1 named Acronym Lookup, using Excel 2007 and Excel 2010.
    I want the cursor to stay in cell B4 on hitting ENTER, so that I can again enter data in cell B4.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Lock all cells except B4, then protect the worksheet.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    xld,

    I did the following:

    Selected cell B4, right clicked on it, selected format cells, selected protection tab and unchecked locked and hidden.

    Clicked on Review, and procted the sheet.
    On entering data and hitting ENTER the cursor still moves down to cell B5.

    I want it to stay at cell B4 only, so that I can enter new data without hitting the up arrow.

    I tried going to Excel options, selected Advanced and unchecked the option for cursor movement, but that affects the excel application in general and all other workbooks.

  4. #4
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    When you protect the sheet uncheck the option to select locked cells.
    Be as you wish to seem

  5. #5
    Thanks xld and Aflatoon, WORKS. GREAT!

Posting Permissions

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