Access 2013 32 bit: Win 7 64bit
Tried: Is it possible to pass a multidimensional array as a parameter in EXCEL VBA? to no avail
(If you can answer this you can probably answer that, but they're a little different)
Sub CreateArray()
Dim myArray(1 to 10, 1 to 5)
'Code that assigns values to (1 to 10, 1 to 4)
myArray() = CalculateLastColofArray(myArray())
'Do stuff with full array
End sub
Function CalculateLastColofArray(calcArray)
For i = LBound(calcArray()) to UBound(calcArray())
calcArray(i,5) = calcArray(i,1) + calcArray(i,3)
Next i
CalculateLastColofArray = calcArray()
End Function
My calculation is actually much more complex than the simple addition and my array is dynamically large (x, 5)
Doing it the way I have shown above fills myArray, but debugging has it shown as when I hover over it wrapped in the function call and it errors before entering the function
calcArrayas an array. TryFunction CalculateLastColofArray(calcArray())