Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
abort macro dialog box
Hi there,
I have a little problem making an dialog box. In my excel sheet i have a commandbutton who runs through my macro. Since i don't want other people to abort the macro with Esc or Ctrl-Break i have put this line in: Application.EnableCancelKey = xlDisabled But now people don't have the ability at all to stop the macro. For some people i think this is anoying because the macro runs for about 2 á 3 minutes. So what i want is 1 abort key, and when they hit this key there is a dialog box whith a warning and a 'cancel' and a 'run macro further' button, somthing like that. Can someone give me some advice or point me in the right direction? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
abort macro dialog box
The simplest way is to set the enablecancelkey property to xlErrorHandler
and trap the canel key press in an error handler. You can then prompt them to cancel or continue. If they press cancel then exit the procedure. If they press run further then put the resume statement in the error handler. Hope this helps Nick "Chris" wrote in message om... Hi there, I have a little problem making an dialog box. In my excel sheet i have a commandbutton who runs through my macro. Since i don't want other people to abort the macro with Esc or Ctrl-Break i have put this line in: Application.EnableCancelKey = xlDisabled But now people don't have the ability at all to stop the macro. For some people i think this is anoying because the macro runs for about 2 á 3 minutes. So what i want is 1 abort key, and when they hit this key there is a dialog box whith a warning and a 'cancel' and a 'run macro further' button, somthing like that. Can someone give me some advice or point me in the right direction? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to abort a w/s calculation in real time? | Excel Discussion (Misc queries) | |||
control of dialog macro dialog box. on open | Excel Programming | |||
How to abort executing macro? | Excel Programming | |||
Abort or continue | Excel Programming | |||
Abort or continue | Excel Programming |