How do i use highlight the contents of the textbox, when on getfocus event?
I tried using SelStart and SelLenght, but am unable to get the results.
Thans for the time taken to help.
You can also put it in you form load statement to do this for every text box.
Options Explicit
dim ctltext as control
For Each ctlText In Controls
If TypeOf ctlText Is TextBox Then
If ctlText.SelStart = 0 Then
ctlText.SelLength = Len(ctlText)
End If
End If
Next ctlText
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.