SETP
asked on
Listbox
If I want to get the text i a listbox in, lets say, index 3. How do I do that? So that if I have a ListBox with 5 items:
"Item 1"
"Item 2"
"Item 3"
"Item 4"
"Item 5"
And I want to get the 3rd item, it should return the text "Item 3".
"Item 1"
"Item 2"
"Item 3"
"Item 4"
"Item 5"
And I want to get the 3rd item, it should return the text "Item 3".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or this works too
MsgBox(ListBox1.Items(2).T oString)
MsgBox(ListBox1.Items(2).T
ASKER
It was so much simpler in VB6....
PS, ListBox1.Items(2).Text() does not work (one would think it should)
PS, ListBox1.Items(2).Text() does not work (one would think it should)
SETP:
It works on a web form. That is what I had open at the time I answered your question!
Dabas
It works on a web form. That is what I had open at the time I answered your question!
Dabas
Have you tried:
ListBox1.Items(2).Text()
Dabas