What's good way to stop a program?

S

Steve Roberts

I have a program that moves lots of email to different folders. There are
rare occasions when I would like to stop the process. Is there a good way to
do this? Maybe a way to capture a keystroke or something?

Thanks

Steve
 
K

Ken Slovak - [MVP - Outlook]

I usually put up a form, maybe with a progress bar control on it and a
button labeled Cancel. In the cmdCancel_Click() handler I set a Boolean
variable that is checked in the code loop. If True I cancel the loop.
 
S

Steve Roberts

Thanks. That worked great. Sometimes it's the easy things that are hard to
figure out!
 
Top