0

Hello everybody
please tell me How to select costum index in a list
in vb6
i have a listbox & a command botton & textbox
example:
we add some items in a listbox
list1.additem = "google.com"
list1.additem = "Gmail.com"
list1.additem = "myspace.com"
list1.additem = "youtube.com"
list1.additem = "facebook.com"
list1.additem = "yahoo.com

now when i change index in textbox i mean 1 or 2 or 4 what i do?
and click to the command botton then
then select the listbox item to the textbox
that's all
please anbody help me and solve my problem

3
Contributors
6
Replies
11
Views
4 Years
Discussion Span
Last Post by razamughal67
0

i mean many items in the list box
when we change text in textbox example 4 then the list1 4 number line or 4 number listindex is selected
if we change 2 in textbox then list1 2 number index select
that's all

0

Thanks
it work but i want to do this
when text1.text 3 or 4 or 5 i mean when i change text1 index and click command botton
the list index cannot select and dont's highlight text line
but text2.text show list text
ok dont worry we managed this code

0

Highlight item which index in textbox.
Try this :

Private Sub Command1_Click()
List1.Selected(Text1.Text) = True
End Sub

Edited by Jx_Man: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.