Private Sub Text3_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
'檢查是否為數值 and 檢查是否按下"Enter"
'檢查是否為數值 and 檢查是否按下"Enter"
If IsNumeric(Text3(Index).Text) = False And KeyCode = 13 Then
a = MsgBox("Input Error", , "Error")
Else
If KeyCode = 13 Then
SendKeys "{TAB}" '傳送"Tab"鍵值
End If
End If
End Sub
a = MsgBox("Input Error", , "Error")
Else
If KeyCode = 13 Then
SendKeys "{TAB}" '傳送"Tab"鍵值
End If
End If
End Sub
沒有留言:
張貼留言