I need to create a 2D array which is not intended to be updated, only read. Reading this question, I found this possibility using evaluate:
Dim varData As Variant
varData = [{1, 2, 3; 4, 5, 6; 7, 8, 9}]
In my case, the number of values requires to split the assignment on several lines, e.g.
varData = [{value1, value2; _
...; _
valueM, valueN}]
However when using _ to split this assignment, VBA complains at the first line with:
Compile Error:
Missing end bracket
I've tried to find the explanation, but all examples seems to use only a single line. What is wrong?
Note: I'm trying to populate an array, not cells in a sheet.