You right sir, it works perfect with split function.
This what i am doing with split function :

Private Sub Command1_Click()
Dim temp As Variant
Dim str As String
str = "i,love,you,forever"
temp = Split(str, ",")
MsgBox temp(0) + vbCrLf + temp(1) + vbCrLf + temp(2) + vbCrLf + temp(3)
End Sub
Comments
Showing Good effort
MsgBox temp(0) + vbCrLf + temp(1) + vbCrLf + temp(2) + vbCrLf + temp(3)

You accessing array with this way..
How about if you have many words separated with commas?
Are you want to get all data by write it one by one?
Use looping and Ubound to get last index of array

Private Sub Command1_Click()
Dim temp As Variant
Dim str As String
Dim arr As String
str = "i,love,you,forever"
temp = Split(str, ",")

For i = 0 To UBound(temp) ' get the last index with Ubound
    arr = arr + temp(i) + vbCrLf ' Read data until last index and store it on arr
Next i
MsgBox arr ' display it on message box
End Sub
Comments
Good Point here.. :D
good point.
You enlighten me so much sir..Thank you :)

Wow, it's great sir.
Thank you for sharing sir. You enlighten me so much..

This question has already been answered. Start a new discussion instead.