我有好几个"text",名称为"text1,text2.....",默认情况下是通过"TAB"在这些输入框中跳转,我想请问如果通过小键盘上的"+"号键来实现在不同的输入框间顺序跳转
还有就是在这些"text"后还有一个按狃,我想请问怎么样才能按"回车"键就会激发这个按牛啊,谢谢

解决方案 »

  1.   

    问题2
    Private Sub Command1_Click()
        MsgBox "执行"
    End Sub
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 13 Then
            Call Command1_Click
        End If
    End Sub
      

  2.   

    谢谢,那怎么样才能通过按小键盘上的"+"在不同的TEXT之间顺序条转,系统默认的是TAB
    知道后马上揭贴,谢谢
      

  3.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
      If KeyAscii = 13 Then
         Text2.SetFocus
      End If
    End Sub
      

  4.   

    If KeyAscii = 13 Then
     这个13 可以改为'+'的Ascii 码,,
      

  5.   

    设置好tabindex属性,在文本框的事件中处理
    Private Sub Text2_KeyPress(KeyAscii As Integer)
        If KeyAscii = 43 Then
            SendKeys "{TAB}"
        End If
    End Sub
      

  6.   

    If KeyAscii = 13 Then  把 13  改为 Asc("+")
      

  7.   

    SendKeys "{TAB}"  用这个更方便一些
      

  8.   

    用SendKeys,
    把那个按钮设成Default不就成了