Für einen Tip, was ich falsch mache, wäre ich wahnsinnig dankbar. Eigentlich habe ich den Ehrgeiz, immer selbst die Lösung zu finden, aber Ich habe schon ein paar Abende herumprobiert und Foren durchsucht, komme aber hier nicht weiter. Hier nun mein Code:
Option Explicit
Sub Import()
Dim QPfad, QDatei, QBlatt As String, QBereich1, QBereich2 As Range, Zelle As Object, lastR As Integer
QPfad = ThisWorkbook.Path & Application.PathSeparator & "Projekte"
QBlatt = "Ressourcenplan"
Set QBereich1 = Range("B7:D11")
Set QBereich2 = Range("B1")
QDatei = Dir(QPfad & Application.PathSeparator & "*.xlsm")
Do
lastR = ActiveSheet.Range("B" & Application.Rows.Count).End(xlUp).Row
For Each Zelle In QBereich1
Zelle = Zelle.Address(False, False)
ActiveSheet.Cells(lastR + Zelle.Row - 5, Zelle.Column).Value = GetValue(QPfad, QDatei, QBlatt, Zelle)
Next Zelle
For Each Zelle In QBereich2
Zelle = Zelle.Address(False, False)
ActiveSheet.Cells(lastR + 2, 1).Value = GetValue(QPfad, QDatei, QBlatt, Zelle)
Next Zelle
QDatei = Dir()
Loop Until QDatei = ""
End Sub
Private Function GetValue(pfad, datei, blatt, zelle2)
Dim arg As String
arg = "'" & pfad & "[" & datei & "]" & blatt & "'!" & Range(zelle2).Range("A1").Address(, , xlR1C1)
GetValue = ExecuteExcel4Macro(arg)
End Function