Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Prevent Escape on Nonmodal Userform with Progressbar
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Lazzaroni, post: 6349500"] 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. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Prevent Escape on Nonmodal Userform with Progressbar
Top