Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default VBA Question

I have a userform that performs a very expensive (time consuming) operation
when the user clicks ok. Is there is any way to allow the cancel button to
be pressed while performing the operation? I believe that this is not
possible with VBA as I believe that Excel is single threaded. Can anyone
confirm this?


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default VBA Question

There's always the end command but you might need to manage the consequences
if it is half way through something.

You would have to display the form as modeless in xl2000 or higher to be
able to allow the user to interact with the form while the process is
running. A cleaner method might be to display a modeless progress bar and
allow the user to cancel if it is taking too long. There's an example on my
site at http://www.enhanceddatasystems.com/E...rogressBar.htm.

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Justin Starnes" wrote in message
...
I have a userform that performs a very expensive (time consuming)

operation
when the user clicks ok. Is there is any way to allow the cancel button to
be pressed while performing the operation? I believe that this is not
possible with VBA as I believe that Excel is single threaded. Can anyone
confirm this?




Reply
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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
If-then-next question les8 Excel Discussion (Misc queries) 3 June 1st 07 05:21 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 10:39 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"