Assuming that you assume words are separated by spaces:
Dim i As String = "Line 0|Line 1|Line 2|Line 3"
Dim a() As String
Dim j As Integer
a = i.Split("|")
For j = 0 To a.GetUpperBound(0)
MsgBox(a(j))
Next
in this example we are using pipes.... should work the same by changing the
i.Split(" ") line
If you are expecting a really long string with 100's of words, i would
recommend looking for the first 'space' within the sentance and then using
the SUBSTRING command to get the first word.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.