1.text1.SelStart =len(text1.len)
2.CursorPos=text1.SelStart 
  Text1.text=left(text1.text,intLen)
  text1.selstart=CursorPos+1

解决方案 »

  1.   


    1:sub text1_setfocus()
        text1.selstart=len(text1)
    end sub
    2:
    text1.maxlenght=
      

  2.   

    Private Sub Text1_GotFocus()
        Text1.SelStart = Len(Text1.Text)
    End Sub
      

  3.   

    re: shawls(小山(求职的程序员-谁让我发挥作用?)
    2:
    text1.maxlenght=这样只能限制长度,而不能将超出的字符删掉
      

  4.   

    Private Sub Text1_Change()
    Dim MaxLen As Integer
    MaxLen = 8
    If Len(Text1.Text) > MaxLen Then
        Text1.Text = Left(Text1.Text, MaxLen)
    End If
    End Sub