tbob thanks for your suggestion. But, my program is huge and your suggestion requires to change my code around, i'm trying to avoid that. I just created the for loops so you can get an idea of what i was trying to do. But, you gave me an idea, I was thinking of creating a semaphore when the user press the abort button, and then through out my program check to see if a semaphore was created. If a semaphore was created i can go ahead and generate an error. Does anybody have other suggestions?