VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Automatically selecting text when Tab key is pressed in a Text Box

by www.itmodule.com (4 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Automatically selecting text when Tab key is pressed in a Text Box

Rate Automatically selecting text when Tab key is pressed in a Text Box



'Name it text1 and text 2--default name
'paste the following code.

Private Sub text1_GotFocus()
    SendKeys "{HOME}+{END}"
End Sub

Private Sub text2_GotFocus()
    SendKeys "{HOME}+{END}"
End Sub


Download this snippet    Add to My Saved Code

Automatically selecting text when Tab key is pressed in a Text Box Comments

No comments have been posted about Automatically selecting text when Tab key is pressed in a Text Box. Why not be the first to post a comment about Automatically selecting text when Tab key is pressed in a Text Box.

Post your comment

Subject:
Message:
0/1000 characters