Morgen
Danke für die Antwort gmg-cc.
Ich habe schon Tage damit verbracht das Problem mit Mr. Goo zu lösen oder VBA Bücher, allerdings ohne Erfolg.
Habe nur sowas gefunden:
Private Function GetValue(path, file, sheet, ref)
' Retrieves a value from a closed workbook
Dim arg As String
' Make sure the file exists
If Right(path, 1) <> "\" Then path = path & "\"
If Dir(path & file) = "" Then
GetValue = "File Not Found"
Exit Function
End If
' Create the argument
arg = "'" & path & "[" & file & "]" & sheet & "'!" & _
Range(ref).Range("A1").Address(, , xlR1C1)
' Execute an XLM macro
GetValue = ExecuteExcel4Macro(arg)
End Function
Sub btnUpdate_Click()
Dim p, f, s, a As String
Dim gPfad As String
Dim gDatei As String
Dim gZelle As String
Dim eResult As String
gZelle = Range("X100").Value
For i = 1 To 7
gPfad = Cells((99 + i), 30).Value
gDatei = Cells((99 + i), 27).Value
p = gPfad
f = gDatei
s = "Summe GJ"
a = gZelle
eResult = GetValue(p, f, s, a)
Cells((99 + i), 33).Value = eResult
Next i
End Sub
Kannst du mir sagen, was diese Funktionen genau ausführen?