|
-
Oct 27th, 2000, 08:43 PM
#1
Thread Starter
New Member
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
A good program is always better if you wrote it!
-
Oct 27th, 2000, 08:47 PM
#2
Code:
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
that should do it.
-
Oct 28th, 2000, 09:09 AM
#3
Thread Starter
New Member
Thanks!
Thanks crptcblade, that was just what I needed; I knew that SelStart and SelLength looked important...
A good program is always better if you wrote it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|