R Randy Dec 5, 2004 #3 I have a button on my form. I would like e.g. F5 to be the key that activates the on-click event. I am creating a small application that will run on a wall mounted screen with only F-keys available.
I have a button on my form. I would like e.g. F5 to be the key that activates the on-click event. I am creating a small application that will run on a wall mounted screen with only F-keys available.
S Steve Schapel Dec 5, 2004 #4 Randy, I think one way would be to use the KeyDown event. I haven't tested this, but something like this... Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyF5 Then KeyCode = 0 Call YourButton_Click End If End Sub
Randy, I think one way would be to use the KeyDown event. I haven't tested this, but something like this... Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyF5 Then KeyCode = 0 Call YourButton_Click End If End Sub