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

I don't understand what you want exactly.
You want to swap items index?

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

try this

text2.text = list1.list (text1.text)

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

Highlight item which index in textbox.
Try this :

Private Sub Command1_Click()
List1.Selected(Text1.Text) = True
End Sub
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.