I have 2 listboxes: lstProduct, lstProducts and when I select an item in lstProduct it takes the value an loads data in lstProducts. Both lists are very long and want to find the first occurance (based on first word of each) and make that the first item in the lstProducts listbox.

The following For loop seems to find the first item but how do I find out what the SelectedIndex is of this item so I can make that section the first item shown?

Thanks for your help in advance.

VB Code:
  1. For Each Item in lstProducts.Items
  2.     If Item.Text.StartsWith(sBrand.SubString(0, sBrand.IndexOf(" "))) = True Then
  3.         lblProduct.Text = Item.Key
  4.         Exit For
  5.     End If
  6. Next