Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • 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
Jun 3, 2003
17
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