Private Sub Command1_Click()
Dim txt As String
Dim y As Variant
Dim i As Long
txt = "apple,10,13,yellow,10,13,mango,10,13,blue,10,13,banana,10,13,pink,10,13,orange"
y = Split(txt, ",10,13,")
For i = 0 To UBound(y)
Debug.Print y(i)
Next i
End Sub
Firstly, please post in the correct forum. This one is for people to share scripts they have written. Secondly, that looks like VB.NET code and this is a VBscript/Powershell site.
Thirdly, please use the CODE tags so that your code is nicely formatted (as above)
Lastly, why are you storing values like that in a string? There are much better ways of doing that sort of thing in .NET