Can someone explain how to use it?
Printable View
Can someone explain how to use it?
It's pretty simple.
Put this code into any procedure and run it. StringArray(0) will be "Hello". StringArray(1) will be "How", and so on.Code:SourceString = "Hello|How|Are|You"
Delimiter = "|"
StringArray = Split(SourceString, Delimiter)
For i = 0 to Ubound(StringArray - 1)
MsgBox StringArray(i)
Next
I hope this helpsCode:Dim i As Long
Dim MyArray() As String
Dim MyData As String
MyData = "hello:dude:you:are:cool"
MyArray() = Split(MyData, ":")
For i = 0 To 5
MsgBox MyArray(i)
Next
;)
Code:for each n in split("another cool sample you must test"," ")
msgbox n
next n
Thanks guys