Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exit an entire task ?
The problem I have is that I have a msgbox which gives the operator the
opportunity to Exit the task. This procedure was part of the code behind a Userform. Once they click Cancel the Exit Sub executes with control reverting back to the original sub routine with the Userform still present on the screen. What I need is to have the click of the Cancel to completely close the task. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exit an entire task ?
Hi
If you have MsgBox "Click Cancel to abandon this procedure", vbOKCancelOnly, "Help" you need to replace it with Response = MsgBox("Click Cancel to abandon this procedure", vbOKCancelOnly, "Help") declaring response as a Variant will do. Now in your main sub you have If Response = vbCancel then Exit sub regards Paul Old Dog wrote: The problem I have is that I have a msgbox which gives the operator the opportunity to Exit the task. This procedure was part of the code behind a Userform. Once they click Cancel the Exit Sub executes with control reverting back to the original sub routine with the Userform still present on the screen. What I need is to have the click of the Cancel to completely close the task. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dialog box for active cell task to speed repeditive task | Excel Programming | |||
exit while? | Excel Programming | |||
Exit when its a Mac | Excel Programming | |||
exit sub | Excel Programming | |||
If a called sub exit, how to the caller exit right away? | Excel Programming |