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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application.OnKey(Key, Procedure) "Hot Keys"

Status
Not open for further replies.

ByDesign

Electrical
Joined
Jun 3, 2003
Messages
17
Location
US
This is a great method... but of course I ran into some trouble.

Application.OnKey(Key, Procedure) sets up hotkeys, for example if you would like "Shift & Cntl & F" to run a sub you would code...

Application.OnKey "+^{k}, "MySub"

I'm using this to show and hide a form as needed.

It works great while excel is the active window... but when the Userform has focus the key combo is not recognized.

The code is currently in my workbook.open event I've tried placing it in the userform activate event as well... but no luck...

Any ideas???

Thanks for the help!!!

Have a great day!

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top