Keycodes

John.Woody

Registered User.
Local time
Today, 21:10
Joined
Sep 10, 2001
Messages
354
I am using keycodes to move dates in a text box forwards and backwards. Keycodes 189 & 187 represent the + and - on the QWERTY part of the keyboard. I want to use Shift and + but don't know how to get the two to work together. What I have so far is posted below.

Private Sub End_Date_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 109 Or KeyCode = 189 Then
Me.End_Date = Me.End_Date - 1
ElseIf KeyCode = 107 Or KeyCode = 187 Then
Me.End_Date = Me.End_Date + 1
End If

End Sub
 
Thanks for that I will look at it. Initially it appears to be for the numeric keypad. I'm after the Shift and + on the main keyboard.
 
Wow that works for both alfa numeric pad and qwerty. Does exactly what I want. Thanks :D
 

Users who are viewing this thread

Back
Top Bottom