P
Paul Stevens
I have userform controls with Key events (down, press, up)
that run procedures if keycode 13 (enter) is pressed.
I may need to halt these proc's, first giving the user
some info in a msgbox. If the user closes the msgbox by
keying Enter, when enter is released the userform control
key event runs again, even a keydown event.
I could restrict the key event to say spacebar, but I want
to allow key Enter. I've tried various unsatisfactory
workarounds:
1. Timer on msgbox keydown to instigate a short delay
before the control can call the proc again. This works OK
but only if the user releases (msgbox) enter quickly.
2. Switch focus from the control, various problems with
this and also I want to end up with focus on the original
control.
I imagine others have run into this, but I have not found
anything searching this ng. So any solution much
appreciated.
TIA
Paul
that run procedures if keycode 13 (enter) is pressed.
I may need to halt these proc's, first giving the user
some info in a msgbox. If the user closes the msgbox by
keying Enter, when enter is released the userform control
key event runs again, even a keydown event.
I could restrict the key event to say spacebar, but I want
to allow key Enter. I've tried various unsatisfactory
workarounds:
1. Timer on msgbox keydown to instigate a short delay
before the control can call the proc again. This works OK
but only if the user releases (msgbox) enter quickly.
2. Switch focus from the control, various problems with
this and also I want to end up with focus on the original
control.
I imagine others have run into this, but I have not found
anything searching this ng. So any solution much
appreciated.
TIA
Paul