Word VBA - Programmatically close modeless form

Posted on 2011-04-27
Last Modified: 2012-05-11
Hi Experts
Is there a way to programmatically close a modeless form?  I have a modelss form containing context relevant data.  It sits in the corner of the screen whilst the user is working.  If the user runs certain functions, I want the form to either close or perhaps refresh the data using a new source.  Is it possible to do either or both of these things?
Thank you for your help.
Question by:MonteDelMar
    LVL 76

    Accepted Solution

    For closing

    Unload UserForm1

    or UserForm1.Hide

    For new data

    UserForm1.TextBox1.Text = "New Text"


    Author Closing Comment

    That easy!! I have spent hours looking for a much more complicated way to do it.  :-)  Thanks again, Graham

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
    Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
    This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
    In a previous video Micro Tutorial here at Experts Exchange (, I explained how to get a free, one-month trial of Office …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now