10,000 element listbox possible? what about searching in it?
ok, I've tried it in Excel using the very basic knowledge I have of vba
(or programming for that matter)....and this is what I found...
the initial filling of the 10,000 element listbox is fast....but the
searches are extremely slow. Is there a better way to do this?
here is the code I have till now (it kind of works...it selects the
element right before the one I am looking for...but regardless of that,
its extremely slow)
-------------------------------------------------------------
Private Sub UserForm_Initialize()
With Sheet1
ListBox1.List = Application.Transpose(.Range(.Range("A2"),_
.Range("A2").End(xlDown)).Value)
ListBox2.List = Application.Transpose(.Range(.Range("A2"),_
.Range("A2").End(xlDown)).Value)
End With
End Sub
Private Sub TextBox1_Change()
i = 0
While TextBox1.Text < Left(ListBox1.List(i), Len(TextBox1.Value))
ListBox1.ListIndex = i
Wend
End Sub
----------------------------------------------------------------
Any suggestions?
thank you
-gguillermo
|