Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Keystrokes accelarators

Posted on 1998-09-21
3
Medium Priority
?
246 Views
Last Modified: 2010-04-30
I need to build a program that when you press
the F12 key a message box appers, without
considerations about who has the focus at that moment.

It´s the same as the shortcut for a menu (menu accelerator),
but I can not use menus in this program.
0
Comment
Question by:vincerubus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:vincerubus
ID: 1435836
Edited text of question
0
 
LVL 4

Accepted Solution

by:
mcix earned 200 total points
ID: 1435837
1. Set the KeyPreview property of the form to True
2. Insert the following the the KeyDown Event of the Form.

Select Case KeyCode

   Case vbKeyF12
      ' F12 defined in VBRUN
      MsgBox "Whatever you want to do"

End Select

0
 

Author Comment

by:vincerubus
ID: 1435838
thanks and congratulations
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question