VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub.

by RSanders (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 27th December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub.

Rate Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub.



'Example:
'--------
'Private Sub txtAFKMessage_LostFocus()
'    Call selText(txtAFKMessage)
'End Sub
'Select all the text 

Sub selText(sObject As Object)
    sObject.SelStart = 0
    sObject.SelLength = Len(sObject.text)
End Sub

Download this snippet    Add to My Saved Code

Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub. Comments

No comments have been posted about Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub.. Why not be the first to post a comment about Select any text at anytime in a textbox/rtf/multi line ect... by calling this 3 line sub..

Post your comment

Subject:
Message:
0/1000 characters