How do you set the selected item in a Combo Box? I'm using VBA but it should be the same as VB but I just don't seem to be doing it right.
Printable View
How do you set the selected item in a Combo Box? I'm using VBA but it should be the same as VB but I just don't seem to be doing it right.
If you want just the Text of the selected item, then you can take it from the Combo1.text property. If you need the Index of the selected item, then i dont know!, perhaps a recursive loop comparing the text to each item in the box.
------------------
Wossname,
Email me: [email protected] :)
Set its ListIndex property.
------------------
Marty
Thanks Marty. That was it, I had been trying to use at the wrong place. In VBA you have to make sure the control has focus and I had it in the wrong place. Thanks.