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!
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!