Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box input range

Status
Not open for further replies.

jiemei1

ISP
Mar 24, 2006
10
US
How can I use the input range but the combo box will only show unique value?
Thanks

 


Please explain what you mean.

You supply the input range to the combo box and it displays each value in the range as s discrete value.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
simple answer is that if your data rnge contains duplicates, your list will contain duplicates. You have 2 options

1: Use the advanced filter function to create a unique list of values - use this for your combo box data range
2: Use a loop in code and the additem method to add discrete items into your combobox. You can do this in 1 of 2 ways - either order the values such that all duplictes are together and then just test for a change in value or do 2 loops - 1 through the data and each time check against the stored list of values in the combobox. I would suggest the former as it should be much quicker to do a sort on the data and then quickly loop through checking for a change in value
 


Or you could use the Advanced Filter on your dup list to create a new list with UNIQUE VALUES.

Skip,

[glasses] [red]Be Advised![/red] A chicken, who would drag a wagon across the road for 2 cents, is…
POULTRY in motion to PULLET for a PALTRY amount! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top