Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Impossible to switch between the windows/books | Excel Discussion (Misc queries) | |||
VIEW BOOKS IN DIFFERENT WINDOWS | Excel Discussion (Misc queries) | |||
2 excel windows opened | Excel Programming | |||
How to open different excel books in different windows? | Excel Discussion (Misc queries) | |||
Print windows opened with FollowHyperLink | Excel Programming |