Click to See Complete Forum and Search --> : Quick question
netSurfer
Jan 18th, 2000, 02:45 AM
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: wossnamex@talk21.com :)
MartinLiss
Jan 18th, 2000, 02:49 AM
Set its ListIndex property.
------------------
Marty
netSurfer
Jan 18th, 2000, 03:05 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.