PDA

Click to See Complete Forum and Search --> : ComboBox


SteveS
Nov 9th, 1999, 11:41 AM
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.

hpet
Nov 9th, 1999, 12:43 PM
To chose something form the list you have to use Combo1.List(<some index> )
In you case this would be Combo1.List(MyValue)

hpet
Nov 9th, 1999, 12:46 PM
in case this was DropDownList style.
If style is DrowDownCombo then you can select item through code like Combo1.Text = Combo1.List(MyValue)

hpet

SteveS
Nov 9th, 1999, 12:47 PM
SORRY!!!

My Mistake, tried to set the index into the list before populating the list into the ComboBox.

Stupid! Stupid! Stupid!

Thanks anyway,

Steve.

hpet
Nov 9th, 1999, 12:49 PM
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