返回列表 上一主題 發帖

[發問] 如何在TextBox輸入資料後按下Enter執行CommandButton(已完成~再次感謝大大們)

[發問] 如何在TextBox輸入資料後按下Enter執行CommandButton(已完成~再次感謝大大們)

本帖最後由 av8d 於 2012-6-17 15:23 編輯

在TextBox1輸入資料後按下Enter執行CommandButton4

我該在哪裡下指令?
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    If KeyCode = 13 Then CommandButton4.Click
End Sub

這個好像不行~努力求解中@@

本帖最後由 av8d 於 2012-6-17 15:23 編輯

回復 3# GBKEE


解開了

If KeyCode = 13 Then CommandButton4_Click

即可以完成~謝謝大大們

TOP

        靜思自在 : 滴水成河。粒米成蘿,勿輕己靈,勿以善小而不為。
返回列表 上一主題