Solved

Keystrokes accelarators

Posted on 1998-09-21
3
237 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now