-
I save the combo1.ListIndex to an array ...
Later I need to recall this value, and set the combobox back to it's previously selected object in the list.
I tried
combo1.ListIndex(MyValue)
combo1.ListIndex = (MyValue)
combo1.ListIndex = MyValue
None work, what am I doing wrong??????
Steve.
-
To chose something form the list you have to use Combo1.List(<some index> )
In you case this would be Combo1.List(MyValue)
-
in case this was DropDownList style.
If style is DrowDownCombo then you can select item through code like Combo1.Text = Combo1.List(MyValue)
hpet
-
SORRY!!!
My Mistake, tried to set the index into the list before populating the list into the ComboBox.
Stupid! Stupid! Stupid!
Thanks anyway,
Steve.
-
sorry, I didn't say right (too early here to think clearly).
You always assign no mather what style.
Combo1.Text=Combo1.List(MyValue)
Ignore upper two posts.
hpet