[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 425
  • Last Modified:

Move to the first character in a text box after update.

I am building an input box for entering a 6 character string. This code can be scanned or entered by hand. To speed up entering this information when scanning I want it to return to the first position ready to accept new input as soon as the "After Update" event triggers. The text box is setup to autotab after the last character is entered so there is no need to do anything but scan the next character string on the list.

I thought it would be as simple this... but it is not working?

With Me!txtWONum
    .SelStart = 0

End With

Fast help gets fast fat points!

Jeffrey Reep
Jeffrey Reep
1 Solution
I think you can use

sendkeys "{HOME}"

after .setfocus

Here some info

Jeffrey ReepCapacity Planning AnalystAuthor Commented:
Great! That works... Not a fan of send keys so if anybody has a better method please let me know and I'll add some points to the pot!

Thanks for the quick response.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now