Sub AllInOne()

    Dim CBk, book As String
    Dim curs, t, awi, sc As Integer
    CBk = ActiveWorkbook.Name
    awi = ActiveWindow.Index
    curs = ActiveSheet.Index
    ActiveWindow.WindowState = xlMinimized
    sc = Sheets.Count
    For Each w In Workbooks
        wnam = w.Name
    If (wnam <> CBk) And (UCase(wnam) <> UCase("personal.xls")) Then
        Workbooks(wnam).Activate
        For t = 1 To ActiveWorkbook.Sheets.Count
            Sheets(t).Copy After:=Workbooks(CBk).Sheets(sc)
            sc = sc + 1
            Workbooks(wnam).Activate
        Next t
        w.Close savechanges:=True
    End If
    Next w
    Workbooks(CBk).Activate
    Windows(awi).Activate
    ActiveWindow.WindowState = xlMaximized
    Sheets(curs).Select
End Sub
Hosted by uCoz