GoosBekerom
New Member
- Joined
- Sep 9, 2014
- Messages
- 6
After some conditions are true the remaining values in a range get added to a combobox on a userform.
It is possible though, that duplicate values get added whenever they both have the same true conditions.
How can I make my VBA code ignore the duplicates?
this is the code that adds the values to the combobox:
It is possible though, that duplicate values get added whenever they both have the same true conditions.
How can I make my VBA code ignore the duplicates?
this is the code that adds the values to the combobox:
Code:
'add resource names to dropdown that have the chosen resource type
For x = 2 To resourceSheet.ListObjects("Table3").ListRows.Count + 1
If resourceSheet.ListObjects("Table3").Range(x, 2) = cType Then
cbName.AddItem resourceSheet.ListObjects("Table3").Range(x, 1)
End If
Next x