Perhaps you could make a stop button on a form then find away to kill the process if the stop button data is present at any point during fun time. Like a loop that keeps checking for the stop button data. You could break it down ito sections to that it checks after each step in the program.