ich habe in einem Userform eine Listbox, die ich aktuell befüllen kann.
Der Code läuft schnell und sauber durch:
Dim rngcellbooking As Range
Dim booking As String
With Tabelle1.Range("A1:A1000")
UserForm4.ListBox1.Clear
Set rngcellbooking = .Find(UserForm1.TextBox1)
If Not rngcellbooking Is Nothing Then
booking = rngcellbooking.Address
Do
With UserForm4.ListBox1
.ColumnCount = 5
.AddItem
.List(.ListCount - 1, 0) = rngcellbooking.Value
.List(.ListCount - 1, 1) = rngcellbooking.Offset(0, 1).Value
.List(.ListCount - 1, 2) = rngcellbooking.Offset(0, 2).Value
.List(.ListCount - 1, 3) = rngcellbooking.Offset(0, 3).Value
.List(.ListCount - 1, 4) = rngcellbooking.Offset(0, 4).Value
End With
Set rngcellbooking = .FindNext(rngcellbooking)
Loop While Not rngcellbooking Is Nothing And rngcellbooking.Address booking
End If
End With
Jetzt soll genau diese Sequenze aber eine andere Datei C:\User\Test.xlsx prüfen. Geht das überhaupt?VG,
Chris