Charlotte E laid this down on his screen :
Hi,
I have a macro, which under some conditions load an UserForm, and under other
conditions don't.
And, on some of these conditions, the UserForm is only loaded, but not shown
(for extraction certain information)
To make sure, that I clean up my act, I have an Unload UserForm statement at
the very end of the macro.
But, for some weird obscure reason the Unload statement actually LOADS the
userform before unloading it!!!
So, my question is, how to test if the UserForm is already opened, so I only
Unload it, if it is open???
TIA,
You should check if it's already loaded and if so then unload it,
otherwise do nothing.
Code...
If Not UserForm Is Nothing Then Unload UserForm
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc