Hi Folks. Attached is a button click routine. It does a complicated, mainly random number calculation in the function calcgames. If this fails, it returns a blank result. After several attempts, it asks the user if they want to carry on and if they reply 'no', calls exit. This doesn't seem to work - if I step through with F8, it goes to the end of the procedure, then continues the procedure at the line : if g = 1 and carries on doing the calculations. I don't understand why the procedure doesn't stop. There is probably an obvious reason but I just can't see it. Any thoughts?