这个自动选定反白整串文字的动作,会使得输入的资料完全取代之前在 TextBox 中的所有字符。

Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
End Sub