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

How to disable Start Menu key

Status
Not open for further replies.

Enk

Programmer
Oct 28, 2006
14
IT
Hi guys.
I have an excel 2000 wb userform in which I have a textbox with many keys disabled via the KeyDown event
(If Keycode=... than Keycode=0).
I did the same thing with the windows key (I mean that key with the Windows logo which activates the start menu).
It works only after I manually enter the tbox, and not if the focus is in the tbox via vba code.
That's a problem because I've set the tbox setfocus property in the initialize event of the userform because I want the key to be immediately disabled, but even if the focus is actually in the tbox, if the user clicks the windows key immediately after opening the form the start menu will be activated.... and it shouldn't....
Where am I wrong?
Any help will be much appreciated
Bye
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top