I’m using Excel 2010, and I wonder why the below code doesn’t work for me? I’ve got compile error: syntax error.
Sub test()
Dim myStudents(,) As String = _
{{"Dick", "Jane", "Tom", "Sam"}, _
{"Sue", "Bill", "Mary", ""}}
End Sub
Example link and code :
Sub xyz()
Dim xyz()()() As Byte
End Sub
This also produced compile error: syntax error when ran.
This is VB.net syntax. VB.net is not the same as VBA, which is what is used in Excel, etc. To do this in VBA you can do something like:
i.e., We create an array of arrays.