Search Tools Links Login

A-1 Bye-Bye ListBox Duplicates


Visual Basic 6, or VB Classic

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

Original Author: twentyleafclover

Code

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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 116 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.