Private Sub test()
Dim fso As Object, FolDir As Object, FileNm As Object, Cnt As Integer
On Error GoTo erfix
Set fso = CreateObject("scripting.filesystemobject")
Set FolDir = fso.GetFolder(ThisWorkbook.Path & "\YOUR FOLDERNAME")
Application.ScreenUpdating = False
For Each FileNm In FolDir.Files
If FileNm.Name Like "*.xls*" Then
Cnt = Cnt + 1
workbooks.Open filename:=FileNm
'*****do stuff in file here
'copy sheet to new file
'Sheets("Sheet1").copy After:=ThisWorkbook.Sheets(Cnt)
Application.DisplayAlerts = False
workbooks(FileNm.Name).Close SaveChanges:=False
End If
Next FileNm
Application.ScreenUpdating = True
Set FolDir = Nothing
Set fso = Nothing
Exit Sub
erfix:
On Error GoTo 0
MsgBox "Error"
Application.ScreenUpdating = True
Set FolDir = Nothing
Set fso = Nothing
End Sub