[RESOLVED] Populate a Listbox
i have figured it out how to fill a listbox with a textfile
but cant do the rest do have to split the string add them to the list index
For i = 1 To UBound(split)
my text file is like this
one
......... blue
......... red
tow
......... green
......... yellow
i have 2 list box i want to load the string one and tow into list1
and when a user click on a list1 item one fill the list2 index with
blue
red
and so on
thanks
Private Sub Form_Load()
Dim txtstring As String
Open App.Path & "\pictuer.text" For Input As #1
list1.Clear
While Not EOF(1)
Input #1, txtstring
list1.AddItem txtstring
Wend
Close #1
End Sub
text file
.............................
one
......... blue
......... red
tow
......... green
......... yellow
:afrog:
Re: [RESOLVED] Populate a Listbox
here was the problem with my code
List1.ListIndex
thanks alot :thumb::thumb::thumb::thumb:
Re: [RESOLVED] Populate a Listbox
Quote:
Originally Posted by
bordino
here was the problem with my code
List1.ListIndex
What mean?
List1.ListIndex isn't a problem, it's a property.
What is the problem?