detect userform

D

David

Hi
I have a modeless userform which i want to unload before i run a macro
I am using the following code:
if myform.visible then
unload myform
else
'do nothing
end if
if the form was loaded then it is immediately unloaded - no problem
however, if the form was not loaded then the code above forces the
myform.initialize to run (and then nothing happens). No damage done but it
seems there is probably a better way?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top