+ Reply to Thread
Results 1 to 5 of 5

Hide/Minimize Excel 2010 workbook when launching userform

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    Portland, OR
    MS-Off Ver
    Excel 2010
    Posts
    5

    Hide/Minimize Excel 2010 workbook when launching userform

    Hello,
    I'm having a difficult time trying to include the code in VBA that would automatically hide/minimize/close the workbook upon launching the userform. It seems easy enough, I just haven't had any success doing it myself.
    Can anyone help here? Thanks,
    Eric
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Hide/Minimize Excel 2010 workbook when launching userform

    Hello enderoos,

    Welcome to the Forum!

    The attached workbook has been modified to hide Excel when UserForm1 is is displayed and restored when the form is closed.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    Portland, OR
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Hide/Minimize Excel 2010 workbook when launching userform

    Thank you much Leith. Is it possible to have the workbook restored when closing userform1 OR userform2.

  4. #4
    Registered User
    Join Date
    01-16-2014
    Location
    Portland, OR
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Hide/Minimize Excel 2010 workbook when launching userform

    Actually I was able to add the same code to userform1 to restore the workbook but it looks like the the only problem is clicking on the "clear" button on userform2 also restores the workbook when in fact it should behave the same way as on userform1, just clear the form data.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Hide/Minimize Excel 2010 workbook when launching userform

    Hello enderoos,

    There are two events used to hide and show Excel. The first is the UserForm Activate event and the second is the UserForm QueryClose event.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How Can I Prevent Excel 2010 From Launching A Default Document?
    By Sandcastle in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-11-2013, 03:49 PM
  2. Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  3. Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  4. Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. Replies: 2
    Last Post: 07-08-2005, 11:05 PM

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