You could use the KeyPress, KeyDown, KeyUp events.
If you are going to manage these events at the form level, you might want to set the KeyPreview property of the form to ‘true’.
Example:
<pre>Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 37 Then
MsgBox (“The left arrow was pressed”)
End If
End Sub</pre>
Please provide more details if you need further help.
Discuss This Question: 1  Reply