|
-
Apr 17th, 2009, 05:43 AM
#1
Thread Starter
New Member
Setting an array with an arbitary number of dimensions to base 0
Hi. I am trying to create a function in VBA that will take any array (so could have any number of dimensions), and shift it to base 0.
For instance, I want the function to be able to be able to take the following
Code:
dim outputArray() as variant
outputArray = myRebaseFunction(inputArray)
so inputArray(1 to 5, 3 to 6) would produce outputArray(0 to 4, 0 to 3), containing all the data of inputArray. Similarly, inputArray (2 to 4, 0 to 1, 3 to 7) would produce outputArray (0 to 2, 0 to 1, 0 to 4), containing all the data of inputArray. If the inputArray always had the same number of dimensions, it would be easy, but given the number of dimensions can be different for different inputArrays, does anyone know a way of dealing with this?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|