on a command 1_click I want to take all the stuff in text1 and put it in list1
text1 is a multiline and looks like
hi
go
today
and so no
and sould load in list1 the same way
hi
go
today
and so no
Printable View
on a command 1_click I want to take all the stuff in text1 and put it in list1
text1 is a multiline and looks like
hi
go
today
and so no
and sould load in list1 the same way
hi
go
today
and so no
Code:Private Sub Command1_Click()
Dim strArray() As String
Dim i As Long
strArray = Split(Text1.Text, vbNewLine)
With List1
.Clear
For i = 0 To UBound(strArray)
.AddItem strArray(i)
Next
End With
Erase strArray
End Sub
That works great thank you !!
Quote:
Originally Posted by Ellis Dee