VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A-1 Bye-Bye ListBox Duplicates

by twentyleafclover (2 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

For Beginners. Get rid of unwanted listbox duplicates in a few very simple lines of code.

Rate A-1 Bye-Bye ListBox Duplicates

Dim j As Integer
 j = 0
  
Do While j < List1.ListCount
 
 List1.Text = List1.List(j)
  
 If List1.ListIndex <> j Then
  List1.RemoveItem j
 Else
  j = j + 1
 End If
  
Loop
  
End Sub

Download this snippet    Add to My Saved Code

A-1 Bye-Bye ListBox Duplicates Comments

No comments have been posted about A-1 Bye-Bye ListBox Duplicates. Why not be the first to post a comment about A-1 Bye-Bye ListBox Duplicates.

Post your comment

Subject:
Message:
0/1000 characters