Determine Escape key usage

bayman

Registered User.
Local time
Today, 19:22
Joined
May 25, 2001
Messages
96
How can I determine if the Escape key has been pressed? I've tried the Form KeyPress event, but that doesn't seem to work.

In this particular form, I enable some command buttons when data changes, but pressing the Escape key cancels the data changes without disabling the buttons.

Help!
 
I use
If (KeyAscii = vbKeyEscape) Then
MsgBox "ESC pressed"
End If

in On KeyPress. Key Preview is set to yes as well.

[This message has been edited by naygl (edited 02-11-2002).]
 
Thanks much. It worked.
 

Users who are viewing this thread

Back
Top Bottom