Hallo Ilyas,
teste es mal so:
Sub Dateien_nacheinander_oeffnen()
Dim i As Long
Dim cDir As String
Dim lngcalc As Long
Dim sPath As String
Dim strAP As String
Dim varLookup As Variant
Dim wks As Worksheet
With Application
lngcalc = .Calculation
strAP = .ActivePrinter
.Dialogs(xlDialogPrinterSetup).Show
.Calculation = xlCalculationManual
.EnableEvents = False
.ScreenUpdating = False
End With
varLookup = Workbooks("Mappe2").Worksheets("Tabelle1").Cells(1).CurrentRegion.Value
sPath = "C:\Users\ilyas\Desktop\Test\"
cDir = Dir(sPath & "*.xls*")
Do While cDir <> ""
With Workbooks.Open(sPath & cDir)
'aenderungen im Worksheet vornehmen
For Each wks In .Worksheets
For i = 2 To UBound(varLookup)
wks.Cells.Replace What:=varLookup(i, 1), Replacement:=varLookup(i, 2), _
LookAt:=xlPart, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
With wks.PageSetup
.LeftHeader = Replace(.LeftHeader, varLookup(i, 1), varLookup(i, 2))
.CenterHeader = Replace(.CenterHeader, varLookup(i, 1), varLookup(i, 2))
.RightHeader = Replace(.RightHeader, varLookup(i, 1), varLookup(i, 2))
.LeftFooter = Replace(.LeftFooter, varLookup(i, 1), varLookup(i, 2))
.CenterFooter = Replace(.CenterFooter, varLookup(i, 1), varLookup(i, 2))
.RightFooter = Replace(.RightFooter, varLookup(i, 1), varLookup(i, 2))
End With
Next i
Next wks
.Close True
End With
'naechste Datei lesen
cDir = Dir
Loop
With Application
.ActivePrinter = strAP
.Calculation = lngcalc
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Gruß Uwe