Auto-Select Text on Focus
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!!!
Original Author: Delio Castillo
Inputs
Textbox Name
Assumptions
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.
Code
Public Sub Select_Text(TextBoxName As Variant)
TextBoxName.SelStart = 0
TextBoxName.SelLength = Len(TextBoxName.Text)
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.