Ok try this. When prompted, select the folder you want to save the files sheet from. It will create a new workbook with the copied sheets.
Sub dave()
Dim cel As Range
Dim FileName, ws As Worksheet
Dim rng As Range
Dim destWB As Workbook
Dim pPath As String
Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application").BrowseForFolder(0, Prompt, 0, OpenAt)
On Error Resume Next
pPath = ShellApp.self.Path
On Error GoTo 0
Application.ScreenUpdating = 0
If pPath = "" Then
' Cancel was selected
MsgBox "Stopping because you did not select a Folder"
Exit Sub
End If
i = 1
Workbooks.Add
Set destWB = ActiveWorkbook
With CreateObject("scripting.filesystemobject")
For Each FileName In .getfolder(pPath).Files
With Workbooks.Open(FileName)
For Each ws In .Sheets
ws.Copy destWB.Sheets(i)
i = i + 1
Next
.Close True
End With
Next
End With
Application.ScreenUpdating = 1
End Sub
Bookmarks