Is there a syntax to use the VBA function Array() to create a multidimensional array?
The documentation does not mention it. Also I did not find any such thing with Google, but searching for "Array" creates too many search results to be useful.
For instance...
Dim MyArr() As Variant
MyArr = Array(("1a","1b"),("2a","2b")) 'This does not work.
MyArr = Array(Array("1a","1b"),Array("2a","2b")) 'This does work, but creates nested arrays.
It seems a multidimensional array can only be filled by explicitly defining it and then assigning the values of the individual elements...
Dim MyArr(9,1) As String
MyArr(0,0) = "Hello"
MyArr(0,1) = "world!"
'etc.
In other systems such as .Net or Java, we have a syntax such as...
Dim MyArr() As String = {{"1a","1b"},{"2a","2b"}}
...and unless I am mistaken, we do not have this in VBA.