|
-
Jan 24th, 2010, 02:32 AM
#1
Thread Starter
Addicted Member
[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
Last edited by bordino; Jan 24th, 2010 at 03:24 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|