Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Minimizing windows for 50+ opened books at one go

Hi guys,

I've opened Book1.xls (I'm in Sheet1's A1, say), and then I open another 50
or so other books from a single folder (at one go). What I'm after is a
generic sub which can minimize all other windows (i.e. those from the 50+
other books except the ones for Book1.xls). I will trigger the sub from
Book1.xls.

Appreciate any insights. Thanks.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Minimizing windows for 50+ opened books at one go

Max,

Private Sub CommandButton1_Click()
Dim Wnd As Window

'Quick way to handle Personal.xls and other hidden windows
On Error Resume Next
For Each Wnd In Application.Windows
If Wnd.Caption < ActiveWindow.Caption Then
Wnd.WindowState = xlMinimized
End If
Next

End Sub

NickHK

"Max" wrote in message
...
Hi guys,

I've opened Book1.xls (I'm in Sheet1's A1, say), and then I open another

50
or so other books from a single folder (at one go). What I'm after is a
generic sub which can minimize all other windows (i.e. those from the 50+
other books except the ones for Book1.xls). I will trigger the sub from
Book1.xls.

Appreciate any insights. Thanks.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




  #3   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Minimizing windows for 50+ opened books at one go

Many thanks, Nick !
Runs smooth, but a small tweak requested as the sub also
minimizes my other windows (window2, 3, etc) opened in Book1.xls
I need these other windows to remain as-is.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"NickHK" wrote in message
...
Max,

Private Sub CommandButton1_Click()
Dim Wnd As Window

'Quick way to handle Personal.xls and other hidden windows
On Error Resume Next
For Each Wnd In Application.Windows
If Wnd.Caption < ActiveWindow.Caption Then
Wnd.WindowState = xlMinimized
End If
Next

End Sub

NickHK



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Minimizing windows for 50+ opened books at one go

Max,
Change
If Wnd.Caption < ActiveWindow.Caption Then
To
If Wnd.Parent.Name < ThisWorkbook.Name Then

NickHK

"Max" wrote in message
...
Many thanks, Nick !
Runs smooth, but a small tweak requested as the sub also
minimizes my other windows (window2, 3, etc) opened in Book1.xls
I need these other windows to remain as-is.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"NickHK" wrote in message
...
Max,

Private Sub CommandButton1_Click()
Dim Wnd As Window

'Quick way to handle Personal.xls and other hidden windows
On Error Resume Next
For Each Wnd In Application.Windows
If Wnd.Caption < ActiveWindow.Caption Then
Wnd.WindowState = xlMinimized
End If
Next

End Sub

NickHK





  #5   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Minimizing windows for 50+ opened books at one go

Excellent, thanks !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"NickHK" wrote in message
...
Max,
Change
If Wnd.Caption < ActiveWindow.Caption Then
To
If Wnd.Parent.Name < ThisWorkbook.Name Then

NickHK





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Impossible to switch between the windows/books Anders5554 Excel Discussion (Misc queries) 2 July 21st 07 04:00 PM
VIEW BOOKS IN DIFFERENT WINDOWS Nirmal Excel Discussion (Misc queries) 2 February 16th 06 04:28 PM
2 excel windows opened filo666 Excel Programming 0 November 17th 05 03:54 PM
How to open different excel books in different windows? Yoga Excel Discussion (Misc queries) 3 March 18th 05 07:32 AM
Print windows opened with FollowHyperLink Howard Excel Programming 0 December 29th 03 03:20 AM


All times are GMT +1. The time now is 11:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"