D
danhattan
I'm wondering if Excel ignores OnKey statements at times.
I used OnKey to jump to a sub when the Esc key is pressed. I want it to work
within the context of a macro displaying a form. However, if a form is
currently visible, pressing the Esc key does nothing. Once the form is gone,
and the macro stops running, then pressing the Esc key jumps to the sub I
want it to.
My conclusion is that if Excel is expecting the user to deal with the form,
then it ignores the OnKey commands. Is this true? If so, unfortunate, since
the idea is to close the form when the Esc key is pressed.
If anyone can shed some light on this, much appreciated. Thank you.
I used OnKey to jump to a sub when the Esc key is pressed. I want it to work
within the context of a macro displaying a form. However, if a form is
currently visible, pressing the Esc key does nothing. Once the form is gone,
and the macro stops running, then pressing the Esc key jumps to the sub I
want it to.
My conclusion is that if Excel is expecting the user to deal with the form,
then it ignores the OnKey commands. Is this true? If so, unfortunate, since
the idea is to close the form when the Esc key is pressed.
If anyone can shed some light on this, much appreciated. Thank you.