i want a text box's text to get selected when it gets focus
Printable View
i want a text box's text to get selected when it gets focus
Correction.. This will do it.
VB Code:
Option Explicit Private Sub Command1_Click() Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text) text1.setfocus End Sub
hi actually i tried to use these properties as well but couldnt something out of it
can u explain the purpose of these as well !
I figured it out.
SelStart tells it where to start the selection
SelLength tells it how long the string is (the length gets calculated)
SetFocus HIGHLIGHTS it.
It took a minute, but I figured it out. :wave:
just like dat
thnkx alot