i'm using the _KeyDown event and it works for some buttons on the keyboard but not all of them.
If KeyCode = vbKeyRight Then....
if i play it then it doesn't do what it supposed to if theright arrow button's pressed.
pleez help!! ;)
Printable View
i'm using the _KeyDown event and it works for some buttons on the keyboard but not all of them.
If KeyCode = vbKeyRight Then....
if i play it then it doesn't do what it supposed to if theright arrow button's pressed.
pleez help!! ;)
play what?
and what are you trying to do?
assign a key to code like a command button?
what keys are you wanting etc?
:rolleyes:
play it meaning run the program
I'll use a label as and example:
if i wanted it to go red i could do this
Label1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyR Then
Label1.Backcolor = vbRed
End If
when you press R it'll change the background colour of the label to red
if i wanted the button pressed to be the right arrow instead of R then it would be
If KeyCode = vbKeyRight Then ... etc.
but this doesn't work and it should