The unfortunate answer is that VB ultimately only allows you to assign arrays as such. However, There is a minor solution that you can take into play. Depending on the data type, you can use different predefined functions in VB to return yourself arrays, but it's kind of crappy. There is a function, in VB4-6, Called "Array", but it will only assign variant data types, and to be perfectly honest with you, variant data types suck. They are huge, bulky, and make your program slower than needs be. They are really ugly variable, and should be avoided. You can use the function like this, however:
Dim theArray() As Variant
theArray() = Array("Spring", "Summer", "Fall", "Winter")
If The Data Type Were Strings, You could get fancy, and use the split function, but it's not really the same concept as you were wanting:
dim strArray as string
strArray = split("summer;winter;spring;fall", ";")
Or You can create a function to handle this, which is probably the best means of doing so. It's a bit of a pain, compared to a language like Perl, or Delphi, where assigning values is fairly easy.
Function ArrayInt(ParamArray values() As Variant) As Integer()
Dim i As Long
ReDim res(0 To UBound(values)) As Integer
For i = 0 To UBound(values)
res(i) = values(i)
Next
ArrayInt = res()
End Function
Let me know how this code works for you, and if you need any further assistance. I'll be glad to help.
The information referenced here, was taken from: devx.com, and the credit belongs to : Francesco Balena.