On Mon, 9 Aug 2004 20:33:31 -0400, Just Me wrote:
I've been checking the doc for the combobox to see it there is some way I
can set it up to be sorted (I found that) and to have no duplicate entries.
I don't see any way to avoid dups unless Sorted implies that.
Is there a simple way to avoid dups or should I program to accomplish that?
Thanks
You can use the contains method to discover if an object already exists
before you add it...
If Not myCombo.Items.Contains(theValue) Then
myCombo.Items.Add (theValue)
End If
You can also use the FindString and FindStringExact methods to see if
certain text is contained...
If myCombo.FindStringExact("Dog") = -1 Then
myCombo.Items.Add ("Dog")
End If
HTH
--
Tom Shelton [MVP]