Wow, it works perfectly. You are incredible. Thank you so so much. I am reviewing the script now.
Is there any way I can pay you back? Barring actual currency and/or sexual favors.
:-)
Wow, it works perfectly. You are incredible. Thank you so so much. I am reviewing the script now.
Is there any way I can pay you back? Barring actual currency and/or sexual favors.
:-)
A variation, just 'cuz it's a quiet Saturday:
![]()
Sub CombineWorkbooks() Dim avsWkb As Variant Dim vsWkb As Variant Dim wks As Worksheet On Error GoTo ErrHandler avsWkb = Application.GetOpenFilename(FileFilter:="Excel Files, *.xls", _ MultiSelect:=True, _ Title:="Files to Merge") If IsArray(avsWkb) Then Application.ScreenUpdating = False For Each vsWkb In avsWkb With Workbooks.Open(vsWkb) For Each wks In .Worksheets If WorksheetFunction.CountA(wks.UsedRange) Then wks.Name = Left(.Name, InStrRev(.Name, ".") - 1) & " " & wks.Name wks.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count) End If Next wks .Close SaveChanges:=False End With Next vsWkb Else MsgBox "No Files were selected" End If ExitHandler: Application.ScreenUpdating = True Exit Sub ErrHandler: MsgBox Err.Description Resume ExitHandler End Sub
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks