Highlight Entire Textbox
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
Highlight textbox/combobox and its entire contents. Simple but cosmetically useful.
Original Author: Alex Fredricks
Code
Public Sub Focus(varX As Variant)
'selects entire txtbox
With varX
If .Text <> "" Then
.SelStart = 0
.SelLength = Len(.Text)
End If
End With
End Sub
''''''''''''''''''''''''''''''''''''
call statement
''''''''''''''''''''''''''''''''''''
Private Sub txtStoreNo_GotFocus()
Focus txtstoreno
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.