Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Sub Button1_Click() Dim MyUniqueList As Variant, i As Long With usr_Form.cbo_pos .Clear ' clear the listbox content MyUniqueList = PosItemList(Sheet10.Range("A4:A100"), True) For i = 1 To UBound(MyUniqueList) .AddItem MyUniqueList(i) Next i .ListIndex = 0 ' select the first item End With Private Function PosItemList(InputRange As Range, _ HorizontalList As Boolean) As Variant Dim cl As Range, cUnique As New Collection, i As Long, uList() As Variant Application.Volatile On Error Resume Next For Each cl In InputRange If cl.Formula <> "" Then cUnique.Add cl.Value, CStr(cl.Value) End If Next cl PosItemList = "" If cUnique.Count > 0 Then ReDim uList(1 To cUnique.Count) For i = 1 To cUnique.Count uList(i) = cUnique(i) Next i PosItemList = uList If Not HorizontalList Then PosItemList = _ Application.WorksheetFunction.Transpose(PosItemList) End If End If On Error GoTo 0 End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.