I just saw this, I tried the following code ; it works fine, I'm using a CheckedListBox to view results.
There 2 arraylist used. 'Darray' holding the original list of duplicated strings. Then, 'FinArray' to dump the non-duplicated strings, then display the 'FinArray' contents in the listbox:
Sub CleanDupes()
' Clear listbox
CheckedListBox1.Items.Clear()
' Create Final Array for non-duped data
Dim FinArray As New ArrayList
Dim InitFinarray, DarrayN, FinArrayN As String
' Add first record from original array into new array
FinArray.Add(Darray.Item(0))
InitFinarray = FinArray.Item(0)
CheckedListBox1.Items.Add("Select/Unselect All")
CheckedListBox1.Items.Add(InitFinarray)
' Loop into Orig Array and compare each record with strings in new array,
' if exist in new array, then skip, else add it
For n As Integer = 0 To Darray.Count - 1
DarrayN = Darray.Item(n)
For n2 As Integer = 0 To FinArray.Count - 1
If FinArray.Contains(DarrayN) Then
Else
FinArray.Add(DarrayN)
FinArray.Sort(1, FinArray.Count - 1, Nothing)
End If
Next
Next
'Display New Non-Duped Array in listbox
For n3 As Integer = 1 To FinArray.Count - 1
CheckedListBox1.Items.Add(FinArray(n3))
Next
End Sub