ComboBox With Unique Items Excel VBA || use Countif to load unique item on ComboBox

preview_player
Показать описание
Today we will learn How to create ComboBox With Unique Items Excel VBA

Multi user Login userform :

Private Sub UserForm_Initialize()
''On Error Resume Next
Dim sht As Worksheet
Dim i As Long
Dim a As Integer
Set sht = Sheets("Sheet1")
For i = 2 To sht.Range("A" & Rows.Count).End(xlUp).Row
x = Application.WorksheetFunction.CountIf(sht.Range("A" & 2, "A" & i), sht.Cells(i, 1))
If x = 1 Then
Me.ComboBox1.AddItem sht.Cells(i, 1)
End If
Next i
End Sub
Рекомендации по теме
Комментарии
Автор

Excellent sir ..please explain the code in hindi or English if possible..u made the job so simple ..thanks a lot 🙏

hemantgoyal
Автор

Sir, agar me Table Range se kiya hai to Unique Items kese reflect karvau

krmotionexcel
Автор

Sir how to get sorted data in this combobox only and sorting should not occur in sheet

hemantgoyal
Автор

Hello you there? error দেখাচ্ছে কেন? (a) veriable not defined

rumim