Start New Discussion within our Software Development Community

I am trying to remove a list item in a listbox... the problem is I have to remove it by the what is visible to the user the program doesnt keep record of the index number in the listbox
we have the following in a list box


I lets say I need to remove one of these how do I search through the listbox "onlineusers" to find "removeduser" 's index number so I can do onlineusers.removeitem

I think that makes sence if you need a better explanation let me know I will try my best

I have solved this on my own actulilly after playing with it for awhile I did

For i = 0 To Userroom.ListCount - 1
                    If LCase(Userroom.List(i)) = LCase(removename) Then
                        Userroom.RemoveItem i
                        chattext.Text = chattext.Text & removename & " has left the room." & vbCrLf
                    End If
                Next i

for some reason it wasnt working before but I got it now so its all good

This question has already been answered. Start a new discussion instead.