A while back I found the following code and for some time it seemed reliable in returning if a user form was loaded:
Unfortunately for reasons unknown it has been returning false positives over the last several months, advising forms to be open after I ran the "unload" command on them. I further noticed that sometimes it returns the false positive, but if I run it again from the immediate window I will get the correct result, somewhat as if the issue is that though the form has been unloaded, the "collection" VBA.UserForms (If I am using the term correctly) has not been flushed of it's name immediately. This appears to have coincided with Office 365, but I can't state that as fact.
Would I be best off to go to a function that attempts to address a property of the passed name of the userform and if it errors return false (and if so, is there a recommended property as I think I know just enough VBA to be dangerous to myself...), or is there a better crafted alternative variation that might be more definite?
Thank-you!
edit: - Hold on, I think I see something that initializes the form but does not show it. I'm not sure if that distinction makes sense, or even if it is a distinction, but I see something happening there...
Bookmarks