Hi, please examine these code :
- Create two modules
- Code on Module1 (please note, there is no the "Option Base 1" line on this module) :
- Code on Module2 :
You probably define the array using the same syntax as the one in Sub Test1_Without_OptionBase1(), that is :
- without the "Option Base 1" line code
- Dim arOutData(3, 6) --> without specifying the lbound for the dimension, so VBA will automatically take this value as the Option Base default value (in this case = 0, because not explicitly specified)
- so the above syntax is actually --> Dim arOutData(0 To 3, 0 To 6)
that's why the output is "shifting" one column to right, while actually you have one extra "hidden column", in this case column(0)
Bookmarks