"Unable to unload within this context" error (VB)
Posted on 2007-03-20
My VB6 app has a number of child forms. In almost all, the user clicks Cancel to exit and return to the main form. However, in a new just-created form, I need the code to automatically unload the form at the end of a process. When I attempt to do this I receive:
"Unable to unload within this context"
I've tried other's suggestions, eg, activating a 50mS timer. Placing an 'unload me' in that procedure also returned the same effort. Even calling a separate routine that unloads the form doesn't help.
Can you help please?