alopecito
09-27-2017, 03:13 PM
Hi all,
I came with this issue:
I have a userform getting the data from a table, the problem is that I have duplicate items on the column A, I get the drop-down from A menu, this is code I'm using:
Dim cell As Range
Dim Rng As Range
With ThisWorkbook.Sheets("sheet1")
Set Rng = .Range("A2", .Range("A2").End(xlDown))
End With
For Each cell In Rng.Cells
Me.ComboBox4.AddItem cell.Value
Next cell
The values are in column A and I filtered as per column B - I only showing the units FIRM, the dropdown code brings ALL the values.
Sample
Unit #
Status
101
Firm
101
Cancelled
102
Firm
103
Firm
104
Firm
104
Cancelled
105
Firm
106
Firm
107
Firm
107
Cancelled
108
Firm
109
Firm
Ideas?
Thanks!
I came with this issue:
I have a userform getting the data from a table, the problem is that I have duplicate items on the column A, I get the drop-down from A menu, this is code I'm using:
Dim cell As Range
Dim Rng As Range
With ThisWorkbook.Sheets("sheet1")
Set Rng = .Range("A2", .Range("A2").End(xlDown))
End With
For Each cell In Rng.Cells
Me.ComboBox4.AddItem cell.Value
Next cell
The values are in column A and I filtered as per column B - I only showing the units FIRM, the dropdown code brings ALL the values.
Sample
Unit #
Status
101
Firm
101
Cancelled
102
Firm
103
Firm
104
Firm
104
Cancelled
105
Firm
106
Firm
107
Firm
107
Cancelled
108
Firm
109
Firm
Ideas?
Thanks!