Listview contain subitem text
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts
Page 1 of 1
How can i check if a listview contains a subitem with the same text as textbox1.text ?
Code: Select all
Public Sub FindItem()
For Each item As ListViewItem In ListView1.Items
For Each subItem As ListViewItem.ListViewSubItem In item.SubItems
If subItem.Text = TextBox1.Text Then
'Found it'
Exit Sub
End If
Next
Next
End Sub
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

MrAksel wrote:Thank youCode: Select allPublic Sub FindItem() For Each item As ListViewItem In ListView1.Items For Each subItem As ListViewItem.ListViewSubItem In item.SubItems If subItem.Text = TextBox1.Text Then 'Found it' Exit Sub End If Next Next End Sub

3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023