Click to See Complete Forum and Search --> : Combo Boxes


ar7kasper
January 31st, 2000, 10:59 AM
Hi
Disc:
I need help on using 'combo boxes'. Any information will be
welcomed.

Johnny101
January 31st, 2000, 03:43 PM
what is it you want to know? You add items to the list like this:

Combo1.AddItem "Your Text Here"



You can loop through all the items in the list like this:

Dim x as Integer
for x = 0 to Combo1.ListCount - 1
MsgBox Combo1.List(x)
next x



If you want to know what item was just clicked...

private Sub Combo1_Click()
'the listindex property will give you the index of the item selected
MsgBox Combo1.List(Combo1.ListIndex)
End Sub



The help file has some examples. and remember, always RTFM. :)

Hope this helps,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com