ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Minimizing a workbook or worksheet (https://www.excelbanter.com/excel-programming/336246-minimizing-workbook-worksheet.html)

Amil

Minimizing a workbook or worksheet
 
I've implemented one of the progress bars suggested in the threads here. I
am looping through a named range and as the process is running, the rows are
changing as expected. What I need is a way to minimize the current sheet or
workbook (setting Visible=false breaks my code). I searched the VBA help for
a way to minimize the sheet but cant find it. How can minimize the sheet or
workbook?

Bob Phillips[_6_]

Minimizing a workbook or worksheet
 
Amil,

Try this

activewindow.WindowState = xlMinimized

--
HTH

Bob Phillips

"Amil" wrote in message
...
I've implemented one of the progress bars suggested in the threads here.

I
am looping through a named range and as the process is running, the rows

are
changing as expected. What I need is a way to minimize the current sheet

or
workbook (setting Visible=false breaks my code). I searched the VBA help

for
a way to minimize the sheet but cant find it. How can minimize the sheet

or
workbook?




Tom Ogilvy

Minimizing a workbook or worksheet
 
With ActiveWindow
.WindowState = xlMinimized
End with

or for the application

application.WindowState = xlMinimized


to restore xlNormal

--
Regards,
Tom Ogilvy


"Amil" wrote in message
...
I've implemented one of the progress bars suggested in the threads here.

I
am looping through a named range and as the process is running, the rows

are
changing as expected. What I need is a way to minimize the current sheet

or
workbook (setting Visible=false breaks my code). I searched the VBA help

for
a way to minimize the sheet but cant find it. How can minimize the sheet

or
workbook?




Amil

Minimizing a workbook or worksheet
 
Worked very well. Thank you.

"Bob Phillips" wrote:

Amil,

Try this

activewindow.WindowState = xlMinimized

--
HTH

Bob Phillips

"Amil" wrote in message
...
I've implemented one of the progress bars suggested in the threads here.

I
am looping through a named range and as the process is running, the rows

are
changing as expected. What I need is a way to minimize the current sheet

or
workbook (setting Visible=false breaks my code). I searched the VBA help

for
a way to minimize the sheet but cant find it. How can minimize the sheet

or
workbook?






All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com