-
I will have this string that will be multilined:
SomeString =
this is line 1
this is line 2
this is line 3
How can I read each line of this string and send each line to a listbox (List1.Additem)
I hope that makes sense, if not, just ignore.
Thanks,
Ryan
-
Code:
Dim words() As String
Dim i As Integer
Dim mystring As String
mystring = "1" & vbCrLf & "2" & vbCrLf & "3"
words = Split(mystring, vbCrLf)
For i = 0 To UBound(words)
List1.AddItem words(i)
Next
That should split the string properly into a listbox.
Hope that helps,
D!m
[Edited by Dim on 08-24-2000 at 07:55 PM]