-
I've probably seen this answer a hundred times today, but I haven't noticed. Here's the story, I have a text box, say Text1, that I want to highlight all of the text in it when the user tabs to it, it can also highlight when the user clicks in it, but it doesn't have to. Please tell me the (probably very simple) way to do this.
Thanks!
sketch2002
-
Code:
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
that should do it.
-
Thanks!
Thanks crptcblade, that was just what I needed; I knew that SelStart and SelLength looked important... ;)