text1.SetFocus
 SendKeys "{Home}+{End}"

解决方案 »

  1.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
      If KeyAscii = 13 Then Text2.SetFocus
    End SubPrivate Sub Text2_GotFocus()
      Text2.SelStart = 0
      Text2.SelLength = Len(Text2)
    End Sub
      

  2.   

    在gotfocus事件里 加入这么两条语句:
    text1.selectstart=0
    text1.selectlenght=len(text1.text)就可以了
      

  3.   

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

  4.   

    在gotgocus中加入
    With Text1
     .SelStart = 0
     .SelLength = Len(.Text)
     .SetFocus
    End With