Populating ComboBox Performance

  • Thread starter Thread starter plutoplanet
  • Start date Start date
P

plutoplanet

Hi
Populating a ComboBox with a String() array of 100 Items takes up to 10
Seconds:
MyComboBox.DataSource = MyStrings
Doing the same within a loop is pretty much faster:
For i = lbound(mystring) to ubound(mystrings)
mycombo.items.add(mystrings(i))
next i
Is there no 3rd way?
Herwig
 
Herwig

The loop technique is substantially faster and there really isnt an
alternative when performance is an issue.

Nick
 
Try setting combo.visible to false before you populate and back to true
after you finish.
 
Back
Top