Is there an alternative method to access an array in VBA?
I was creating a N-Dimensional Array Library when I realized that it is impossible to implement such a library of helpers without an alternative method to access an array in VBA...
For example using an array as an index?:
' instead of foo(6,2)=source(1,3,6,2) :
Dim idx1, idx2
idx1 = Array(6,2): idx2 = Array(1,3,6,2)
foo(idx1) = source(idx2)
The idea is to create/copy/change/merge SubArrays. For example:
Dim blnPending as Boolean
Dim idx1, idx2
idx1 = Array(0,0): idx2 = Array(1,3,0,0)
blnPending = True
Do While blnPending
foo(idx1) = source(idx2)
blnPending = IndexIncrease (idx1, PivotDimension:= -1)
IndexIncrease idx2, PivotDimension:= 1 ' second param just to reflect the idea of usage
Loop
Same problem with Redim in this particular
Any idea?
VarPtrArrayAPI and theRtlMoveMemoryAPI. It's a real hair-puller, though, as Excel crashes on pretty much any bug in your code, so developing takes forever and a day.