Hello there

I'm trying to write code which responds to the users manipulation of 2 of the arrow keys (you know the ones just under the delete, end and page down keys). The code below compiles okay but it doesn't do anything. I just was just wondering how to modify it.
All contributions gratefully accepted.

meandmymachine


Heres the code:

Dim vbKeyRight As Integer
Dim vbKeyLeft As Integer

Private Sub KeyPress1_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
If KeyCode = vbKeyRight Then
MsgBox("Right Key Pressed!")
End If
End Sub

Private Sub KeyPress2_KeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer)
If KeyCode = vbKeyLeft Then
MsgBox("Left Key Pressed!")
End If
End Sub