Wow, thanks Rylo!
OK first, for the combo box
Yours worked great, but when I tried to transfer it over to the original worksheet I don't get an error but the comboboxes are empty, any thoughts?
Private Sub cmbCategory()
Dim DataSH As Worksheet, dicCat
Set DataSH = Sheets("Data")
Set dicCat = CreateObject("Scripting.dictionary")
On Error Resume Next
For i = 2 To DataSH.Cells(Rows.Count, 1).End(xlUp).Row
If Not dicCat.exists(DataSH, Cells(i, 4).Value) Then dicCat.Add DataSH.Cells(i, 4).Value, DataSH.Cells(i, 4).Value
Next i
On Error GoTo 0
Category.List = dicCat.items
End Sub
Private Sub cmbDrawer()
Dim DataSH As Worksheet, dicDra
Set DataSH = Sheets("Data")
Set dicDra = CreateObject("Scripting.dictionary")
On Error Resume Next
For i = 2 To DataSH.Cells(Rows.Count, 1).End(xlUp).Row
If Not dicDra.exists(DataSH, Cells(i, 5).Value) Then dicDra.Add DataSH.Cells(i, 5).Value, DataSH.Cells(i, 5).Value
Next i
On Error GoTo 0
Drawer.List = dicDra.items
End Sub
Private Sub cmbManufacturer()
Dim DataSH As Worksheet, dicMan
Set DataSH = Sheets("Data")
Set dicMan = CreateObject("Scripting.dictionary")
On Error Resume Next
For i = 2 To DataSH.Cells(Rows.Count, 1).End(xlUp).Row
If Not dicMan.exists(DataSH, Cells(i, 7).Value) Then dicMan.Add DataSH.Cells(i, 7).Value, DataSH.Cells(i, 7).Value
Next i
On Error GoTo 0
Manufacturer.List = dicMan.items
End Sub
Bookmarks