+ Reply to Thread
Results 1 to 5 of 5

Minimizing windows for 50+ opened books at one go

  1. #1
    Max
    Guest

    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. #2
    NickHK
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Max
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #4
    NickHK
    Guest

    Re: 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" <[email protected]> wrote in message
    news:%[email protected]...
    > 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" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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. #5
    Max
    Guest

    Re: Minimizing windows for 50+ opened books at one go

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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1