F
Fred
I have created a userform with an Initialize event that loads the userform
from a database.
To use the form I run
Load myForm
myForm.Show
Unload myForm
The form has an OK Button and a Cancel button which both hide the form and
then the next line of code unloads (terminates) the form.
It all works OK except when the user closes the form by clicking the form's
close button (top right cross).
When this happens the form actually terminates so when the Unload myForm
code runs, because myForm has been terminated it is first re-initialized
before it is then terminated.
Although there are no errors and it still works OK it is annoying as the
initialize event downloads quite e bit of data and so takes quite a while.
Is there any way I can find out if myForm has been terminated before I run
the Unload command.
Thanks,
Fred
from a database.
To use the form I run
Load myForm
myForm.Show
Unload myForm
The form has an OK Button and a Cancel button which both hide the form and
then the next line of code unloads (terminates) the form.
It all works OK except when the user closes the form by clicking the form's
close button (top right cross).
When this happens the form actually terminates so when the Unload myForm
code runs, because myForm has been terminated it is first re-initialized
before it is then terminated.
Although there are no errors and it still works OK it is annoying as the
initialize event downloads quite e bit of data and so takes quite a while.
Is there any way I can find out if myForm has been terminated before I run
the Unload command.
Thanks,
Fred