Try:
Option Explicit
Sub LoopThroughDirectory()
' for testing
Const sSourceFolder As String = "C:\Test\"
' for live work
'Const sSourceFolder As String = "C:\CE Sign In\"
Dim MyFile As String
Dim erow
MyFile = Dir(sSourceFolder)
Do While Len(MyFile) > 0
If MyFile = "zCE Class Sign In MASTER 2018.xlsm" Then
Exit Sub
End If
Workbooks.Open sSourceFolder & MyFile
Range("A2:O4").Copy
ActiveWorkbook.Close
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Application.DisplayAlerts = False
ActiveSheet.Paste _
Destination:=Worksheets("Sheet1").Range(Cells(erow, 1), Cells(erow, 15))
Application.DisplayAlerts = True
MyFile = Dir
Loop
End Sub
Bookmarks