Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21847

[RESOLVED] Keyboard ShortCut not working?

$
0
0
Hi there all! I am working on a alphabet bingo game for students, and I am trying to rig it up so if a user presses the C button their keyboard it would call a a sub.
Like this.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
' This case will CALL a letter
Case vbKeyC: CallALetterButton_Click

Case Else:
Exit Sub 'let the keycode pass to the form
End Select
KeyCode = 0 'discard the key
End Sub

The problem is, when I try it, nothing happens, and it is the right sub.. Am I missing something my code here? Thanks!

Viewing all articles
Browse latest Browse all 21847

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>