VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Select all text in a text box

by Darkhacka (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 2nd February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Select all text in a text box

API Declarations



No declarations...

Rate Select all text in a text box



'This function selects all text in a textbox
'Usage:  Put code in the gotfocus event
'Usage:  SelectAllTxt TextBoxName
Dim Search, Where
Where = InStr(TextBoxName.Text, Search)
If Where Then
    TextBoxName.SelStart = Where - 1
    TextBoxName.SelLength = Len(TextBoxName)
    Exit Function
Else
    Exit Function
End If
End Function

Download this snippet    Add to My Saved Code

Select all text in a text box Comments

No comments have been posted about Select all text in a text box. Why not be the first to post a comment about Select all text in a text box.

Post your comment

Subject:
Message:
0/1000 characters