Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shortcut Key Strokes

Status
Not open for further replies.

DariceLR

MIS
Jun 20, 2001
27
US
How do you code shortcut keys, for example Ctrl-X or Ctrl-C and other options available in the Menu Editor? Where does the code go? ****************
DariceLR
:-{} :-V :-x
****************
 
I'm not quite sure if this is what you mean...but here is the code for, let's say, having a msgbox pop-up everytime someone hits F5. (I can't remember the code for multiple keys such as Ctrl-C)

Private Sub Form_Load()
KeyPreview = True
End Sub

Private Sub Form_KeyDown()
If KeyCode = vbKeyF5 Then
MsgBox "You hit F5!"
End If
End Sub
 
IF anyone is looking for what I did to solve this:

In assigning the Ctrl + Key pairs to the menu commands in the Menu Editor, I was assigning but it wasn't calling them because I didn't have working data to the Subs associated with them... As soon as I found how to Cut, Copy, and Paste they started working....

****************
DariceLR
:-{} :-V
****************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top