View Single Post
  #2 (permalink)  
Old May 11th, 2004, 02:44 PM
katsarosj katsarosj is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I would be happy to hear otherwise, but I have done tons of searching on this subject and have found no other method but to use SelectedValue or SelectedIndex. That being said, if you want to loop through all of the items in a combobox you can do something like:

For x = 0 to combobox.items.count - 1
'add your code here (code from below would go here)
Next

In this example, I had a known value that I was comparing it against and I would add:

If combobox.items.item(x) = ItemValueIKnow Then
  combobox.selectedindex = x
End If

----------------------------
There may, and should be an easier way, but if there is I couldn't find it. Hope this helps.

J
Reply With Quote
The Following User Says Thank You to katsarosj For This Useful Post:
Ron Howerton (February 22nd, 2013)