+ Reply to Thread
Results 1 to 4 of 4

How to minimize the Excel window while the Macro is running ?

  1. #1
    Registered User
    Join Date
    11-01-2007
    Location
    Virginia
    Posts
    1

    How to minimize the Excel window while the Macro is running ?

    Hi,

    I am running a macro which process about 500 excel files from a folder, the code is running fine. However, the excel window is frozen when the macro is running, I could not select some shortcut on my desktop on the part where the excel window is on top of it.

    May you show me how to minimize the Excel window while the Macro is running ? And if it is possible, popup window showing progress bar on how many percent it is processed based on the number of file processed vs number of total files, and also display the name of the file currently processed below it.

    Thanks. I really appreciate your help.

    Regards,
    Thang Nguyen
    [FONT="Arial Narrow"Thang Nguyen
    [email protected]
    ][/FONT]

  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
    Hello Ndt,

    Welcome to the Forum! Here is a macro to minimize Excel from code.
    Please Login or Register  to view this content.
    Adding the Macro
    1. Copy the macro above pressing the keys CTRL+C
    2. Open your workbook
    3. Press the keys ALT+F11 to open the Visual Basic Editor
    4. Press the keys ALT+I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Paste the code by pressing the keys CTRL+V
    7. Make any custom changes to the macro if needed at this time
    8. Save the Macro by pressing the keys CTRL+S
    9. Press the keys ALT+Q to exit the Editor, and return to Excel

    To Run the Macro...
    To run the macro from Excel, open the workbook, and press ALT+F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-14-2012
    Location
    Arizona, US
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: How to minimize the Excel window while the Macro is running ?

    I realize this is an old post, but this works too:
    Application.WindowState = xlMinimized

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    Tucson
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: How to minimize the Excel window while the Macro is running ?

    The above (Application.WindowState = xlMinimized) works well and is easy to use. I added it as the first line in the macro.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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