+ Reply to Thread
Results 1 to 10 of 10

Activate Arrow Keys To Jump From Textbox1 to Right or Left

  1. #1
    Registered User
    Join Date
    06-10-2018
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    5

    Question Activate Arrow Keys To Jump From Textbox1 to Right or Left

    Hi Sir/Mdm,

    I got a problem I couldn't solve and need your help.
    I have a set of textboxes as:

    Box1 Box3 Box5
    Box2 Box4 Box6

    I could only operate arrow keys of Up and Down,
    but not Right and Left.
    I tried using Tab or Shift+Tab, but I could only go to 1-2-3-4... (in sequence),
    I expected I could jump from Box1 to Box3 then Box5...

    would you please to share your valuable knowledge, please

    regards
    Nur

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    I'm not sure but I don't think the left and right arrow keys are supposed to do this. They will only move the cursor left or right within the text area of the current textbox.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    I'm pretty sure you can set the tab sequence to do what you want.

    See: https://msdn.microsoft.com/en-us/vba...index-property
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    06-10-2018
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    5

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    thank you guys
    sure I could use Tab to move left or right,
    just looks not efficient once I use Tab to move right/left
    and use arrow keys to move Up/down at same time. Looking so same once I use mouse or cursor to move.
    I need moving faster to reduce time of typing much (in case of many text boxes).

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    If you could make the arrow keys tab to the next box, as defined by you, you wouldn’t be able to use them to move left and right to edit the keyed data if any mistakes are made.

    That said, this seems to address the issue you have: https://www.excelforum.com/excel-pro...-userform.html

  6. #6
    Registered User
    Join Date
    06-10-2018
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    5

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    Indeed I followed as your link said.
    I knew that right-left keys is to assist us once correct typo-error,
    but why could not we do both (correction and move to next box)
    when we operate right-key to type or correct an error, once the cursor position on last character of current box and then we hit once the right-key, the cursor will move to next box.

    please enlighten me more, Bro Sis

    thanks

  7. #7
    Registered User
    Join Date
    06-10-2018
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    5

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    in addition, when we have text boxes with feature of multi-lines,
    we could operate arrow keys of up-down to both assist correction and move to another box placed beneath the current one. Thanks

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    when we operate right-key to type or correct an error, once the cursor position on last character of current box and then we hit once the right-key, the cursor will move to next box.
    Not my code but, as far as I can see, that's what the code does. I think it's specific to the user's requirements so you will need to adapt it.

    As for the follow up requirement, you're going to have to work that one out for yourself.

    I would suggest that it would be far easier and much more reliable to use the tab keys with the tab order/index.

    I can offer no further help with this thread.

  9. #9
    Registered User
    Join Date
    06-10-2018
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    5

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    In fact I did what suggested. I am just a newbie with vba as thing I know very little about. So my thread might sound strange voice. As well as an impact of I just simply thought that Tab and up/down arrow keys are not really good combination.

    Again. Thanks to all of you for any ideas shared.

    Rgd
    Nur

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Activate Arrow Keys To Jump From Textbox1 to Right or Left

    I'm done here. However, I have asked other members of the forum for their input.

+ 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] How to push painted cell using the arrow keys or shape-arrow in Excel - VBA-Offset?
    By Dumy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-04-2015, 05:05 AM
  2. [SOLVED] Arrow keys
    By Kim in forum Excel General
    Replies: 4
    Last Post: 08-10-2014, 05:57 PM
  3. How to move the textbox cursor from textbox1 to textbox2 using the arrow key?
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2014, 05:14 AM
  4. [SOLVED] ActiveSheet.TextBox1.Activate
    By zplugger in forum Excel General
    Replies: 4
    Last Post: 09-13-2012, 04:10 PM
  5. Arrow Keys
    By sunnyjs321 in forum Excel General
    Replies: 2
    Last Post: 08-22-2006, 05:30 PM
  6. alternative to TextBox1.Activate
    By jose luis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2005, 09:48 PM
  7. [SOLVED] arrow keys
    By Dean in forum Excel General
    Replies: 2
    Last Post: 02-14-2005, 11:06 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