Making speed keys on numeric keypad.

G

Geno

I have a data entry form and would like to map "keypad plus" to simulate a tab to tab forward, and "keypad minus" to simulate a shift-tab backwards.

On form properties, I set KeyPreview=yes, and used an event handler for keyDown as follows:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyAdd
KeyCode = vbKeyTab
Case Else
KeyCode = KeyCode
End Select
End Sub

This works fine. I just cant seem to get the sequence correct for Case vbKeySubtract.

Any suggestions?


TIA, Gene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top