kommt die Fehlermeldung: "anwendungs und objektdefinierter fehler"
Sub export()
'Optimieren der Laufzeit
Application.Calculation = xlManual
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim sPath As String
Dim sFile As String
Dim QWB As Workbook
Dim ZWB As Workbook
sPath = "C:\Sarah\Projekte\2020\"
sFile = sPath & "Vorlage.xlsx"
Set QWB = Workbooks.Open(sFile)
Set ZWB = ThisWorkbook
With QWB.Worksheets("Details Differenzmengen")
ZWB.Worksheets("Ergebnis").Range(Cells(1, 3), Cells(7, Range("C1").End(xlToRight).Column)). _
Copy
Cells(2, 29).PasteSpecial xlPasteValues
End With
'Datei wieder geschlossen
'Workbooks(sFile).Close savechanges:=True
'Optimieren der Laufzeit
Application.DisplayAlerts = True
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub