+ Reply to Thread
Results 1 to 3 of 3

restricting cursor movement

  1. #1
    Registered User
    Join Date
    03-19-2008
    Posts
    3

    restricting cursor movement

    Hi all,

    anyone can help me on this...

    How do i control the cursor movement within unlocked cells. I have created a simple input form by unlocking a certain range of cells (e.g. B3:H33) and locking all remaining cells so that when I protect the sheet, the cursor movement will only be contained within the unlocked range of cells. My problem now is that when I press my left arrow key from B13, it goes to H33; when i press the down arrow from B33, it goes to C13.. In short, by just hold-pressing any of the arrow keys, the cursor moves across all unlocked cells.. Is it possible for the cursor to stop when it reaches the B13 or B33 (or when it reaches any of the start/end cell of a row/column?

    Thanks in advance. :-)

    Smallville

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Smallville,

    This macro will direct the tabbing to the cells of your choosing. Just enter the cell addresses you want into the macro (marked in blue). You can edit this later if you need to add or remove to change the tabbing order. This will move from to cell C5 on the first tab, C7 on the second, B2 on the third, H5 on the foruth, and starts over at C5. You will need to install this macro on each sheet you want to control tabbing on.
    Please Login or Register  to view this content.
    How to Save a Worksheet Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
    3. Left Click on View Code in the pop up menu.
    4. Paste the macro code using CTRL+V
    5. Save the macro in your Workbook using CTRL+S

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-19-2008
    Posts
    3

    restricting cursor movement

    Hi Leith Ross,

    I really appreciate your reply But what I want to do is to stop the cursor when it is in the beginning or end of the cell range even if I'm still pressing the arrow key. I dunno how to explain but say for instance, I have an active cell range
    B13 to B33
    C13 to C33
    D13 to D33
    .
    .
    .
    H13 to H33

    all other cells were locked and can't be selected because the protection password is activated.

    Scenario1:
    my cursor is in B13 (which is the beginning of the active cell range), if I press the left arrow key, it should not move; if i press down arrow key, it should go all the way down to B33 and should stop in B33; if i press right arrow key from B13, it should go across the active cells to H13

    Scenario2:
    my cursor is in H13 (which is the end of the active cell range), if i press the right arrow key, it should not move; if i press down arrow key, it should go across the active cells to H33 and stop in H33; if i press left arrow key from H13, it should go across all active cells to B13 and shout stop there....

    ....and so on


    Rgds,
    smallville

+ 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