Visual Basic Programming Code Examples Visual Basic > Code Snippets Code Examples Highlight all text in a text box Highlight all text in a text box Private Sub Text1_GotFocus() Text1.SelStart = 0 Text1.SelLength = Len(Text1) End Sub