Public Function Split(ByVal InputString As String, Optional ByVal Delimiter As String = " ", Optional ByVal Count As Long = -1, Optional ByVal CompareMode As Long = 0) As String()
Splits a string into an array of strings by searching for a specified delimiter. The delimiter itself is removed. If a count is specified and there are more items then this number, the last element will contain all the rest of the string.
Dim lArray As String() = Split("This is a demo", " ", 3)
SendDebug UBound(lArray) 'Prints 2
SendDebug lArray(0) 'Prints 'This'
SendDebug lArray(1) 'Prints 'is'
SendDebug lArray(2) 'Prints 'a demo'