SplitVBA
Um aus einem String ein Array zu machen, gibt es nach XL97 die Funktion Split.
Hier die Nachbildung dieser Funktion, die zudem noch recht schnell ist.
'SplitVBA
Function SplitVBA(strText As String, Trenner As String)
Dim a As Long, b As Long, c() As String
Dim d As Long, vorher As Long
d = Len(Trenner)
vorher = 1
ReDim c(1 To Len(strText) \ d + 1)
Do
b = InStr(vorher, strText, Trenner)
If b = 0 Then
c(a + 1) = Mid$(strText, vorher,
Len(strText))
If c(a + 1) = "" Then
a = a - 1
Exit Do
Else
c(a + 1) = Mid$(strText, vorher,
b - vorher)
End If
vorher = b + d
a = a + 1
Loop
ReDim Preserve c(1 To a+1)
SplitVBA = c
End Function