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
so
we have the following in a list box

Bob
Fred
John
George
Jane
Joe
Anna


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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.