Hi Al
The line in your code
FolderPath = Environ("userprofile") & "DesktopTest" would never works
It should be
FolderPath = Environ("UserProfile") & "\Desktop\Test"
It is shown on the website
Later they clarify
I made some additions to the code, I switched off the alerts to avoid prompting messages
I tested on my side with a Test folder on my desktop and works perfectly
Follow the instructions above if your folder is on a different path
*********************************************************************************************
Sub ConslidateWorkbooks()
'Created by Sumit Bansal from https://trumpexcel.com
Dim FolderPath As String
Dim Filename As String
Dim Sh As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
FolderPath = Environ("UserProfile") & "\Desktop\Test"
Filename = Dir(FolderPath & "*.xls*")
Do While Filename <> ""
Workbooks.Open Filename:=FolderPath & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.Copy After:=ThisWorkbook.Sheets(1)
Next Sheet
Workbooks(Filename).Close
Filename = Dir()
Loop
Application.ScreenUpdating = True
Application.DisplayAlerts = True
MsgBox "Job Done"
End Sub
***********************************************************************************************
I hope this helps
Regards
Jeovany