Не нужно считать файлы или создавать массив, просто обновляйте их по мере их обнаружения.
Sub ModifyAllFiles()
Dim Filename As String, MyPath As String, count As Integer
Dim wb As Workbook, t0 As Single
t0 = Timer
MyPath = "Macintosh HD:Users:Danespola:Desktop:test"
If Right(MyPath, 1) <> Application.PathSeparator Then
MyPath = MyPath & Application.PathSeparator
End If
' this may not work for excel files created with windows
'Filename = Dir(MyPath, MacID("XLSX"))
Filename = Dir(MyPath)
If Filename = "" Then
MsgBox "No files found"
Exit Sub
Else
Application.ScreenUpdating = False
Do While Filename <> ""
If LCase(Right(Filename, 5)) = ".xlsx" Then
count = count + 1
Set wb = Workbooks.Open(MyPath & Filename)
With wb.Sheets(1)
.Range("A5").Value = "ca1"
.Range("A6").Value = "ca2"
End With
wb.Save
wb.Close
End If
Filename = Dir()
Loop
Application.ScreenUpdating = True
End If
MsgBox count & " files updated", vbInformation, "Finished in " & Int(Timer - t0) & " secs"
End Sub