troubleshooting Question

VBA Code - How to tab from one TextBox to another so that after tabing the cursor is at the end of all the text in the next TextBox

Avatar of FaheemAhmadGul
FaheemAhmadGulFlag for United Kingdom of Great Britain and Northern Ireland asked on
VBAMicrosoft Excel
10 Comments2 Solutions139 ViewsLast Modified:
On a VBA user Form I have two Text Boxes (named txtFirstName and txtLastName) and I frequently need to tab from one to another.

Currently when I tab from textbox to another all the text in the next Text Box gets selected. I would like to be able to tab to the next text box such that after pressing the tab key the cursor is at the of all the text in next TextBox.

I would appreciate help with how I set the properties of these Text Boxes so I achieve the above objective - that is after pressing the tab key when I get into the next textbox the cursor is at the end of all the text in the next text box.
If there is any VBA code which could enable such behaviour I would appreciate help with that also. Thanks.
I include an image to show what I am getting now and how I would like it to be.

Sample Image
ASKER CERTIFIED SOLUTION
Flyster

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros