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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top