MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Minimizing Excel

Posted by TJ on June 28, 2001 1:48 PM

What is the exact command that must be used to minimize an Excel worksheet from Visual Basic Code?

Please reply to my e-mail.


Posted by Ron on June 28, 2001 1:52 PM

Try Application.WindowState = xlMinimized

Posted by Damon Ostrander on June 28, 2001 1:57 PM


Worksheets don't have an individual window that can be minimized, only workbooks. To minimize the currently active window:

ActiveWindow.WindowState = xlMinimized

To minimize any workbook window:

Windows("book1.xls":1).WindowState = xlMinimized

where the :1 refers to the first window associated with workbook book1.