If KeyAscii = 13 ThenCommand1_Clickend if不过要把它改为全局过程:Public Sub Command1_Click()msgbox ""End Sub
把需要设置的command1按钮的defalut属性设置为true即可.