Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent Escape on Nonmodal Userform with Progressbar
Is there any way to use a progressbar control in a modal userform?
I need to block users from accessing Excel or interrupting code execution by pressing Escape while a progressbar is being displayed. Pressing Escape while a nonmodal userform is active returns €śCode execution has been interrupted.€ť Pressing Escape while a modal userform is active does the same thing as the Cancel button if a Cancel button control is present. I tried capturing the keydown event with the following code, but the code gets interrupted before it can capture the keycode: Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = vbKeyEscape Then Unload Me End Sub Either I need to be able to display a progressbar control in a modal userform, or I need to be able to capture the Escape KeyDown event. Thanks for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Progressbar on userform for waiting querytable retrieving data from web | Excel Programming | |||
ProgressBar control in Userform | Excel Programming | |||
NonModal Forms and Set Focus | Excel Programming | |||
MODAL vs. NonMODAL | Excel Programming | |||
using escape key to exit a userform | Excel Programming |