View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
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
---