可我写的这代码怎么不行那?
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 13 Then
MsgBox "aaa"
End If
End Sub
用KEYDOWN吧
Private Sub TextBox3_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
MsgBox "aaa"
End If
End Sub