Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab Then
MsgBox "TAB押したよ!"
End If
End If
ってことでしょうか?
API使うなら、
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Function TabOn() As Boolean
If GetAsyncKeyState(vbKeyTab) <> 0 Then
TabOn = True
End If
End Function
って感じかな。