|
| |||||||||
| Tags: items, listbox, remove |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to remove items from ListBox
I am having two list boxes namely emp1 and emp2. The first one is filled with 10000 entries whereas the other is empty. I want to move some of the entries from emp1 to emp2 for the employees which has left the company. To do so I have to remove the items from emp1 and then add them to emp2. Logic is proper but the problem is that I am unable to do. Can you help me how to code for removing an item from emp1 and then add them to emp2? How to remove items from ListBox? |
|
#2
| ||||
| ||||
| Re: How to remove items from ListBox
The code should be something like this: Code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e _ As System.EventArgs) Handles Button1.Click ListBox1.Items.RemoveAt(6) 'remove the item by specifying it's index number in the above code End Sub |
|
#3
| |||
| |||
| Re: How to remove items from ListBox
You can remove the item from emp1 by using the code: Code: emp1.RemoveItem (emp1.SelectedItem) Code: emp2.AddItem (emp1.SelectedItem) |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to remove items from ListBox" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MSE: How to Remove Quarantined Items | Adrut | Technology & Internet | 5 | 07-08-2010 03:17 PM |
| Add/remove programs listbox.htc not registered | Justin23 | Operating Systems | 3 | 08-12-2009 03:47 PM |
| Remove start up items | Arval | Operating Systems | 4 | 10-03-2009 07:19 PM |
| Delete orphaned items from Add/Remove Programs? | Demetrius | Operating Systems | 4 | 06-03-2009 02:54 PM |
| How to remove Desktop context menu items | Sudy Nim | TroubleShoot 98 | 6 | 30-01-2008 10:33 PM |