Thread: detect userform
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default detect userform

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