Try something like this, listbox.items ListBox.ObjectCollection Property:
For Each i As Object In ListBox1.SelectedItems If CStr(i).Contains("myword") Then BackColor = Color.Blue ' Do your logic here, I just used setting the BackColor for a test End If Next
source share