Hi All,
I have the following code to collect only one of the values in row C into a ComboBox1.
Now I want to change the code so that it still does the same, but than collect only the values from the visible cells.
Dim myCollection As New Collection
Dim oneCell As Range
Dim oneString As Variant
For Each oneCell In Range(Range("C2"), Range("C65536").End(xlUp))
On Error Resume Next
For Each oneString In Split(CStr(oneCell.Value), ",")
myCollection.Add Item:=oneString, Key:=oneString
Next oneString
On Error GoTo 0
Next oneCell
With UserForm1.ComboBox1
For Each oneString In myCollection
.AddItem oneString
Next oneString
End With
Bookmarks