by Delio Castillo (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (10 Votes)
Nice feature to help users edit textboxes. The code selects all the existing text when the users focus on the textbox control. This will definitely make your application more user friendly. Please Vote!!!
Inputs
Textbox Name
Assumes
Copy this sub on your code and then use the textbox name as a parameter when you call the sub. When I use it, I usually call the SUB on the GotFocus event.
Public Sub Select_Text(TextBoxName As Variant)
TextBoxName.SelStart = 0
TextBoxName.SelLength = Len(TextBoxName.Text)
End Sub