well of course the loop carries on! you are not terminating it. so are you wanting to terminate the code when the form is closed/unloaded the FIRST time? when you show a form like the way you are doing, code execution halts because the form is what is called a dialog. and a dialog takes precedence over literally anything else. that's why the form doesn't reload and the loop continues until you close it. thus, if what I speculate you want is true, you can do it a countless number of ways. one way, which comes to my mind, is to check a global var. a boolean perhaps. so, for instance, you would write this in the primary module:
and then, you would write this behind your cancel button:
and then, you would write this at the end of your primary routine before the loop begins its next go-round:
Bookmarks