Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Declare Sub Split(ByRef arr() as Variant, target as String, search as String)
Declare Sub Print_Array(arr() as Variant)
Sub Main()
Dim arr() As Variant
Call Split(arr, "xxxyz, xxxyz1234,xxxx7352,yyyME,YYYMEZ10", ",")
Call Print_Array(arr)
MsgBox "Done"
Call Split(arr, "a@b@c@d@e", "@")
Call Print_Array(arr)
MsgBox "Done"
End Sub
Private Sub Split(ByRef arr() As Variant, target As String, search As String)
Dim i As Integer, j As Integer
i = InStr(1, target, search)
j = 1
Do While i > 0
ReDim Preserve arr(j)
arr(j) = Trim(Mid(target, 1, i - 1))
target = Mid(target, i + 1)
i = InStr(1, target, search)
j = j + 1
Loop
ReDim Preserve arr(j)
arr(j) = target
End Sub
Private Sub Print_Array(arr() As Variant)
Dim i As Integer
For i = 1 To UBound(arr)
MsgBox arr(i)
Next
End Sub