Maybe I'm missing something (I'm a bit rusty), but this works for me in
Excel XP:
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
Select Case KeyCode
Case 37
MsgBox "Left"
Case 38
MsgBox "Up"
Case 39
MsgBox "Right"
Case 40
MsgBox "Down"
Case 188
If Shift = 0 Then
MsgBox "Comma"
Else
MsgBox "Less than"
End If
Case Else
End Select
End Sub
_________________________________________________________________________
"robotman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to capture key presses in a text control on a form and need
> to use KeyUp event (vs. Keypress) so I can capture the arrow keys.
>
> It doesn't appear that KeyUp distinguishes between '<' and ',' (since
> they are both the same key on the keyboard).
>
> Am I missing something? Is there some event that captures arrow keys
> AND would distinguish between '<' and ','?
>
> Thanks.
>
> John
>
|