LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Progressbar on userform for waiting querytable retrieving data from web [email protected] Excel Programming 4 July 11th 07 02:58 AM
ProgressBar control in Userform Charlie Excel Programming 7 October 21st 05 11:47 PM
NonModal Forms and Set Focus JimP Excel Programming 0 November 24th 04 02:56 AM
MODAL vs. NonMODAL JimP Excel Programming 5 November 18th 04 01:21 PM
using escape key to exit a userform heidi Excel Programming 3 June 4th 04 05:25 PM


All times are GMT +1. The time now is 11:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"