I have a menu-style List Box and I want users to be able to just hit the Enter key on their keyboard to select items.
However, the List Box doesn't recognize (at all) when the Enter Key is pressed! I know it's possible to do this because I've done it with Text Boxes before and was wondering if there was some workaround that is needed for List Boxes. . .
My VBA Code is as follows:
Code:
Private Sub ProgList_KeyPress(KeyAscii As Integer)
MsgBox "Character '" & KeyAscii & "' pressed!"
End Sub
Obviously this is just a Stub. The real code would run a Function from one of my Modules.
When I press the Enter key, absolutely nothing happens (well, it moves the selection to another field)! But when I press any other key, I get the MsgBox just like I'm supposed to.