I'm trying to capture Ctrl+RightArrow and Ctrl+RightArrow but nothing happens. If I test for the Ctrl Key also it fires, so I know the keyDown event is being triggered.
I also have the KeyPreview = True.
Can anyone tell me what I need to do?
dpdoug
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim CtrlDown As Integer
CtrlDown = (Shift And vbCtrlMask) > 0
If CtrlDown And KeyCode = vbKeyRight Then
MsgBox "Ctrl+RightArrow pressed."
ElseIf CtrlDown And KeyCode = vbKeyLeft Then
MsgBox "Ctrl+LeftArrow pressed"
elseif CtrlDown Then
MsgBox "Ctrl Key pressed"
End If
End Sub
I also have the KeyPreview = True.
Can anyone tell me what I need to do?
dpdoug