Hiyas,
I'm not exactly a VB expert, so please help me out here. =)
How do I remove a selected item in a ListBox? I tried using .RemoveItem, but it needs an index value, and now I'm stuck.
Thanks,
-Git
Printable View
Hiyas,
I'm not exactly a VB expert, so please help me out here. =)
How do I remove a selected item in a ListBox? I tried using .RemoveItem, but it needs an index value, and now I'm stuck.
Thanks,
-Git
the inde value is the number f the item u wanna delete
How do I get the value though?
Thanks,
-Git
Very Basic......
Here is the answer, kiddo.
When you display a list box full of some values, its .ListIndex property is -1. When a user clicks on any item in the list, the .ListIndex property contains the index of that item. So you have to write..
List1.RemoveItem(List1.ListIndex)
Does it help?
Thanks mate - works perfectly. =]
-Git
The Index start from 0 at the top of the ListBox.
Am I right?
yeah, the first item is 0
second item is 1 and so on...