just a tip: this is the way i use it...
VB Code:
'in a module... Sub HiLite(myText as TextBox) myText.SelStart = 0 myText.SelLength = Len(myText.Text) End Sub 'then call it in a TextBox's GotFocus event: Private Sub Text1_GotFocus() HiLite Text1 End Sub
this is helpful when you're dealing with multiple textboxes...![]()
or better use control array so you are going to call the gotfocus event only once for al the textboxes.





Reply With Quote