Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

All - automatically highlight content on focus


Sub  SelectAll()
'Put this in the GotFocus event of a textbox
Me .ActiveControl.SelStart = 0
Me .ActiveControl.SelLength = Len( Me .ActiveControl.Text)
End Sub