eine Frage: gibt es eine Möglichkeit ComboBox und ListBox füllen
aus einer geschlossenen Arbeitsmappe? Vielleich mit ADO-Zugriff?
Hat jemand eine Idee wie es geht? Oder einen Beispiel.
Vielen Dank im Voraus.
Grüße
Function LeseEx(Pfad As String) As Variant
Dim wert As Variant
On Error GoTo error
Dim myXL_Application As Object
Set myXL_Application = CreateObject(Class:="Excel.Application")
myXL_Application.Workbooks.Open Pfad
myXL_Application.WindowState = xlMinimized
myXL_Application.Visible = False
'hier müssen deine Abfragen rein
wert = myXL_Application.Sheets(1).Range("A1")
myXL_Application.Quit
Set myXL_Application = Nothing
LeseEx = wert
Exit Function
error:
On Error Resume Next
myXL_Application.Quit
Set myXL_Application = Nothing
End Function
Gruss
Tino
Das Forum lebt von Rückmeldungen!
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
aktualisieren und danach diese Daten in deine Combobox übernähmen
Gruss Tino
Das Forum lebt von Rückmeldungen!