Try this:
Public Sub Area_GotFocus()
Area.SelStart = 0
Area.SelLength = Len(Area)
End Sub
Area is the name of the TEXT box. every time you TAB to the box or click in
the box it will hilight the whole field
Winston
------
Hello listers,
I'm hoping for programming help again. I'm learning visual basic, and can't
seem to figure out how to highlight the whole text in a textbox at run time.
For example, the user enters numbers in a textbox and then presses a command
button to do certain task. i want to be able to highlight the text in this
textbox after the task is done, and be ready for next input that way. the
user won't have to delete the text manually, and will just type over the
text in the textbox. i don't want to use text1.text = "" way of deleting the
text because i want the user to be able to see the number he/she entered
just before the task.
Thanks in advance!
Ahror Rahmedov
8435 Dallas Avenue South
Seattle WA 98108
PCSOFT's List Owner's:
Bob Wright<[log in to unmask]>
Drew Dunn<[log in to unmask]>
|