I've got 2 severals forms loaded and a main loop form in form1. In form3 i've got i button with the function to unload the form1. But the main loop is still running
How can kill all functions running in a form when i unload it?
Best Regards
Printable View
I've got 2 severals forms loaded and a main loop form in form1. In form3 i've got i button with the function to unload the form1. But the main loop is still running
How can kill all functions running in a form when i unload it?
Best Regards
Try declaring a Form Wide Variable to Indicate When the Form is Unloading and Have your Function(s) Stop if it's set to True, eg.
private bExit as Boolean
private Sub Form_Activate()
Do
'Executing some Function Here..
DoEvents
Loop Until bExit
End Sub
private Sub Form_Unload(Cancel as Integer)
bExit = true
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]