by Muhamad Akber (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code like vb's own function called Split
Dim myArray(), ConcdStr As String
Dim IntCounter, TextLen, ArrCounter As Integer
TextLen = Len(Expression)
For IntCounter = 1 To TextLen
If Mid(Expression, IntCounter, 1) = Delimiter Then
myArray(ArrCounter) = ConcdStr
ConcdStr = ""
IntCounter = IntCounter + 1
ArrCounter = ArrCounter + 1
End If
ConcdStr = ConcdStr & Mid(Expression, IntCounter, 1)
If Len(ConcdStr) <> 0 Then
ReDim Preserve myArray(ArrCounter)
myArray(ArrCounter) = ConcdStr
End If
Next
MySplit = myArray
End Function