我想在文本输入框中相应Enter键,就是当输入数据按enter键的时候能相应确定按钮。怎么做呢?好像网页中登陆之后按Enter键和点击确定按钮一样效果的那种。

解决方案 »

  1.   

    把“确定”按钮的Default设置为True
      

  2.   

    如何在Msgbox当中换行呢?Msg1写第一行,Msg2写第二行。
      

  3.   

    以下代碼在Text1中敲下回車鍵,自動調用Command的單擊事件.
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = 13 Then
            KeyCode = 0
            Call Command1_Click
        End If
    End Sub
      

  4.   

    回复:如何在Msgbox当中换行呢?Msg1写第一行,Msg2写第二行。
    msgbox msg1 & vbcrlf & msg2