How can I test to see if a user form is loaded. If I try to access any item on the user form my code goes right into the form initialize to begin loading it. What I would like to do is test to see if the form is loaded.
How can I test to see if a user form is loaded. If I try to access any item on the user form my code goes right into the form initialize to begin loading it. What I would like to do is test to see if the form is loaded.
Scott
The harder it gets the happier I am.
Finally got my signature set up!
Hi,Originally Posted by scottintexas
Untested but perhaps something like:
![]()
Please Login or Register to view this content.
Thanks for the reply.
What I ended up doing is setting a global variable true when the form is loaded and false when unloaded so I can just check the variable. DUH!
Again, thanks for your help.
Hello scottintexas,
You can check if any forms are loaded by checking the Count property of the UserForms collection. The most recently loaded form is at index zero.
To check if a particular form has been loaded, you have to loop through the collection and check the form name. The UserForms collection object only accepts a number for the index. This code example returns the index number in the collection for the UserForm named "UserForm1"![]()
Please Login or Register to view this content.
Sincerely,![]()
Please Login or Register to view this content.
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks