L
Lazzaroni
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.
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.