VB6 - Defining a String Array
If you want a String array as opposed to the Variant array Array()
will yield;
Function ArrayString(ParamArray tokens()) As String()
ReDim arr(UBound(tokens)) As String
Dim i As Long
For i = 0 To UBound(tokens)
arr(i) = tokens(i)
Next
ArrayString = arr
End Function
...
Dim a() As String
a = ArrayString("foo", "bar", ..., "qux")
Dim s
s = Array("a", "b", "c", "d")
Here's another possibility:
Dim S() As String
S = Split("a|b|c|d", "|")