Solved

Keystrokes accelarators

Posted on 1998-09-21
3
241 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 50 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 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