Closed Thread
Results 1 to 1 of 1

Test if a user form is loaded

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Test if a user form is loaded

    A while back I found the following code and for some time it seemed reliable in returning if a user form was loaded:

    Please Login or Register  to view this content.
    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...
    Last edited by alansidman; 03-22-2017 at 02:31 PM. Reason: closed at OP request

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Form Class not supported in VBE/can't be loaded. Can this be converted?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-03-2014, 12:10 PM
  2. [SOLVED] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  3. [SOLVED] Excel vba user form- open directly to user form not worksheet
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 04-24-2013, 05:07 PM
  4. Checking for User Form loaded
    By scottintexas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2008, 02:58 AM
  5. Event when a user form is loaded
    By shashi1515 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2006, 04:34 PM
  6. Ensure Addin is loaded properly by user - no double clicking
    By Rich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2005, 09:05 AM
  7. [SOLVED] How check if form is loaded?
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2005, 09:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1