In der Userform 2 wird gesucht was auch gut funktioniert aber leider zu langsam.
Das öffnen dauert fast 5sec und bei der suche im Textfeld lagt es total.
In der abgespeckten Version merkt man es nicht aber bei 3000 Datensätzen sehr wohl.
Abgespeckte Version ist blitzschnell
https://www.herber.de/bbs/user/148867.xlsm
Frage :
Irgendwo ist ein kleiner Fehler im VBA Code aber wo genau?
Ich vermute hier in diesemCode Teil.
If Ftext = "" Or InStr(1, W.Cells(i, 1) & W.Cells(i, 2) & W.Cells(i, 3) & W.Cells(i, 6) & W.Cells(i, 7) & W.Cells(i, 8), Ftext, _
vbTextCompare) Then
With Me.Lst_Treffer
.AddItem CStr(W.Cells(i, 1))
.List(.ListCount - 1, 1) = CStr(W.Cells(i, 2))
.List(.ListCount - 1, 3) = CStr(W.Cells(i, 3))
.List(.ListCount - 1, 4) = CStr(W.Cells(i, 4))
.List(.ListCount - 1, 6) = CStr(W.Cells(i, 6))
.List(.ListCount - 1, 7) = CStr(W.Cells(i, 7))
.List(.ListCount - 1, 8) = CStr(W.Cells(i, 8))
Danke
Gruß
Oraculix