Listbox

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.
2 posts Page 1 of 1
Contributors
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Listbox
Martin
Hi
Is it posible to do this?

Listbox1:
Code: Select all
1
2
3
Listbox2:
Code: Select all
2
Then you check if listbox1 contains the items in listbox2 and if so it removes those items so it looks like this

Listbox1:
Code: Select all
1
3
Google let me down this time so im hopping you can help me :D
Image
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: Listbox
Martin
Cody helped me :P
Code: Select all
For Each item In ListBox1.Items 
If ListBox2.Items.Contains(item) Then 
ListBox2.Items.Remove(item) 
End If 
Next
Image
2 posts Page 1 of 1
Return to “Coding Help & Support”