Hi, I have two comboboxes and want to fill with details from column f and column K from my database without duplicate items. The database will be updated daily. Basically this is what I've done but the comboboxes have no output when I run the program. Can somebody help me?
Private Sub UserForm_Click()
Dim i As Long
For i = 2 To Application.WorksheetFunction.CountA(Sheet1.Range("F:K"))
For a = 6 To 11
If Sheet1.Cells(1, a).Value = Me("Label" & a).Caption Then
Me("combobox" & a).AddItem Sheet1.Cells(i, a).Value
End If
Next a
Next i
End Sub
Private Sub UserForm_Click()
Dim i As Long
For i = 2 To Application.WorksheetFunction.CountA(Sheet1.Range("F:K"))
For a = 6 To 11
If Sheet1.Cells(1, a).Value = Me("Label" & a).Caption Then
Me("combobox" & a).AddItem Sheet1.Cells(i, a).Value
End If
Next a
Next i
End Sub