This issue has come up rather unexpectedly and I can't seem to figure out what exactly the problem is. So, basically.. I am trying to loop through a listbox and remove any items that match up with the items/contents of another listbox. My code works fine.. up until I import a list of items that consist of over 300 into the first listbox then nothing gets removed. I know it sounds a little bit confusing.. but just take a look at my code and you can probably see what I'm talking about.
Any help is appreciated! Thanks
Code
Using FD As New OpenFileDialog()
FD.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
If FD.ShowDialog = Windows.Forms.DialogResult.OK Then
WordBox.Items.Clear()
WordBox.Items.AddRange(IO.File.ReadAllLines(FD.FileName))
For Each item In Listbox2.Items
For i As Integer = WordBox.Items.Count - 1 To 0 Step -1
If WordBox.Items(i).Contains(item.ToString) Then
WordBox.Items.RemoveAt(i)
End If
Next
Next
End If
End UsingAny help is appreciated! Thanks
Do not deal with me off site. I never deal offsite unless I have verified via PM.



![[Image: 23gSeM8.gif]](https://i.imgur.com/23gSeM8.gif)
