A 文本框输入的字符达到12个的时候 焦点自动跳到B文本框中

解决方案 »

  1.   

    在文本框的_KeyPress(KeyAscii As Integer)事件里判断长度
    到12,就 sendkey vbtab 
      

  2.   

    SendKeys "{Tab}"
    这样写也可以
      

  3.   

    [Quote=引用楼主 hunanwentao 的回复:]
    A 文本框输入的字符达到12个的时候 焦点自动跳到B文本框中
    [/Quote
    正解!!!!!!!!!!!
      

  4.   

    if len(text1.text)=12 then text2.SetFocus
      

  5.   


    Private Sub Text1_Change()
    If Len(Text1.Text) = 12 Then
    Text2.SetFocus
    End If
    End Sub