PDA

Click to See Complete Forum and Search --> : Stopping execution at the form level


Janitor
Dec 29th, 1999, 08:01 AM
I need to find a way to stop execution on the form level. I have a cancel button that should end all activity on the current form, hand control back to a main form, and close itself. Unfortunately, once I get done executing the unload procedure, the code begins executing back where it was stopped. The "End" statement won't work because it ends the entire program's executions. Thanks for all help.

Clunietp
Dec 29th, 1999, 09:26 AM
In those cases, I've used a global variable to determine if a valid selection was chosen in the modal form. If not, then exit sub (the sub that showed the form), otherwise, continue.

I don't like doing it that way, but that's the only other way I can think of, besides the modal form modifying a property on the main form, and testing for that, but that's basically the same thing. Anyone else?