Search Tools Links Login

Highlight Entire Textbox


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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 70 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.