README.md

December 5, 2022 ยท View on GitHub

Auto-Select Text on Focus

Description

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!!!

More Info

Textbox Name

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.

Submitted On
ByDelio Castillo
LevelBeginner
User Rating4.4 (44 globes from 10 users)
CompatibilityVB 5.0, VB 6.0
CategoryString Manipulation
WorldVisual Basic
Archive File

Source Code

Public Sub Select_Text(TextBoxName As Variant)
  TextBoxName.SelStart = 0
  TextBoxName.SelLength = Len(TextBoxName.Text)
End Sub