设form1的keypreview=truePrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Call EnterToTab(KeyCode)
End SubPublic Sub EnterToTab(Keyasc As Integer)
If Keyasc = 13 Then
SendKeys "{TAB}"
End If
End Sub
Call EnterToTab(KeyCode)
End SubPublic Sub EnterToTab(Keyasc As Integer)
If Keyasc = 13 Then
SendKeys "{TAB}"
End If
End Sub
EnterToTab(Keyascii)
把form.keypriew=true
在form.keypress事件中 If Keyasc = 13 Then
SendKeys "{TAB}"
End If
就可以了
估计应该是TabIndex没设好