Sub OpenAll()
' This macro opens all files in the working (default) directory,
' one at a time, then loops through all worksheets in the workbook
' deleting the first four rows, and then closes each file.
Dim Filename As String
Dim GoAhead As Variant
Dim WS As Worksheet
'Look for all files ending with .xls
'Can include entire path if desired. This example assumes working
'directory so no path specified.
Filename = Dir("*.xls*")
GoAhead = MsgBox("This macro will delete the first 4 rows of every workbook" & vbLf & _
"in " & Application.DefaultFilePath & ", starting with: " & vbLf & _
Filename & ". Are you sure?", vbYesNo, "Important Warning")
If GoAhead = vbNo Then Exit Sub
Application.DisplayAlerts = False
Do While Filename <> ""
Workbooks.Open Filename
Application.StatusBar = Filename & " opened."
For Each WS In Worksheets
WS.Rows("1:4").Delete
Next WS
ActiveWorkbook.Close True
Application.StatusBar = Filename & " closed."
'read next filename
Filename = Dir()
Loop
Application.DisplayAlerts = False
Application.StatusBar = False
End Sub