Excel-VBA 2007 seems to have a limit of 64 to the size of the arrays passed as arguments.
Does anyone know of a fix or workaround?
Here is the code:
Public Function funA(n)
Dim ar()
ReDim ar(n)
funA = ar
End Function
Public Function funB(x)
funB = UBound(x)
End Function
From Excel:
=funB(funA(2^16-1)) '65536 as expected
=funB(funA(2^16)) 'Gives a
Looking inside, funA () works fine, but, passed to funB, the argument x is a 2015 error.
source
share