-
Private Sub myControl_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{tab}"
End If
End Sub
I got the above code as one of your tips, I would like to the above to call another sub when the tab key is pressed.
I have tried using keycode 9 for tab but it does not appear to work for me.
Can someone help me with this
yours Keith
-
Try this.
Private Sub myControl_KeyPress(KeyAscii As Integer)
If KeyAscii = 9 Then
Call <Your Function Here>
End If
End Sub
BTW, You can get the whole set of ASCII code table from the MSDN, then it will resolve most of your probblem. :D