Minimize and Maximize

jcg

Board Regular
Joined
Jul 12, 2002
Messages
156
Is there a way to minimize a workbook in VBA and same question for restore once minimized?
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
Application.WindowState = xlMaximized
- or -
Application.WindowState = xlMinimized
 

jcg

Board Regular
Joined
Jul 12, 2002
Messages
156
I should have been more clear, I don't want to minimize the application (excel) just the workbook inside the application. So, is there a way using VBA to minimize (and then maximize) a workbook within excel without minimizing the application itself?

Thanks
 

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
Would this be what you are after?
Code:
    ActiveWindow.WindowState = xlMinimized
'- or - 
    ActiveWindow.WindowState = xlMaximized
 

Watch MrExcel Video

Forum statistics

Threads
1,118,074
Messages
5,570,048
Members
412,308
Latest member
cornelb
Top