-
Nov 14th, 2014, 02:44 PM
#1
Thread Starter
PowerPoster
Type mismatch when I try to remove a listbox item I click on? :)
Hello there folks!
I have a listbox called YourGameList. I make a play list of games I want to play in that listbox, but sometimes I would like to remove an item from that playlist/listbox.
My hope is to click on the item I want to remove and the selected item is removed. Next, the listbox items under the removed item moves up so there is no "empty spot" where the removed item was.
I tried this, but I get a type mismatch error.
YourGameList.RemoveItem YourGameList.List(YourGameList.ListIndex)
The index could be any number though, as sometimes I might want to remove the top/0 index item, or 3 down, etc.
Did I miss a step here??
Thanks a ton!!
-
Nov 14th, 2014, 02:48 PM
#2
Re: Type mismatch when I try to remove a listbox item I click on? :)
Code:
YourGameList.RemoveItem
expects a valid index number
Code:
YourGameList.List(YourGameList.ListIndex)
This would be the content of that list item not the index number
This would be correct
Code:
YourGameList.RemoveItem YourGameList.ListIndex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|