Question on KeyDown Event

J

John Lane

In the KeyDown Event, is there a trick to trap a control key plus another key
sequence, say for instance I wanted to trap "Ctl+T"? Or do I have to save
them sequentially and figue it out in progamming code? Thanks.
 
D

Douglas J. Steele

Private Sub Text0_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyT And (Shift And acCtrlMask) = acCtrlMask Then
msgbox "You just hit Ctrl-T"
End If
End Sub
 

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

Top