'Use this code to figure out the key codes
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Print KeyCode
End If
End Sub
From there, you can see the numerical equivalents to the keys. From there, you can just plug in the numbers replacing the brackets.
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case Is=[left]
label1.Caption = "LEFT"
Case Is=[right]
label1.Caption = "RIGHT"
Case Is=[down]
label1.Caption = "DOWN"
Case Is=[up]
label1.Caption = "UP"
End Select
End Sub
|