Ich habe in Excel eine Funktion die aus bestimmten Zellen ein 45 Dimensionales Array zurückgibt.
Nun möchte Ich aus Access diese Excel Datei öffnen, die Funktion ausführen und den Rückgabewert (also das Array) in eine Access Variable speichern.
Der Code in Excel:
Public Function GetTimes()
' Auslesen von Zellen usw. ..
GetTimes = Array
End Function
Der Code in Access:
For I = 1 To Pfade.count
' Sonstiger Code
Set Excel = CreateObject("Excel.Application")
If Excel Is Nothing Then
MsgBox "Konnte keine Verbindung zu Excel herstellen!", 16, "Problem"
Exit Sub
End If
With Excel
.visible = False
.Workbooks.Open Pfade(I)
' Hier ist der Punkt wo ich scheitere:
' Es soll der Rückgabewert von GetTimes in DataSet gespeichert werden!
DataSet = .Application.run "GetTimes"
End With
Set Excel = Nothing
Next I
Ist das überhaupt möglich und wenn ja wie?
Vielen Dank im Vorraus für die Hilfe und MfG
BobbtimusPrime
|