'********************************************************************
'*
'* Sub aryMDUbound
'*
'* Author: NetworkAdminKB.com
'* Created: 2009-01-18
'* Modified: 2009-01-18
'*
'* Purpose: Evaluate a Multi-Dimensional array and return an array
'* with the UBounds of each dimension stored as values
'* in the corresponding elements
'*
'* Input: aryAny = The Multi-Dimensional array to evaluate.
'* aryReturn = Returns the UBound of each Dimension as a value
'* in the array starting at the first (1) position.
'*
'* Output: Returns aryReturn as an Array, with the UBound of each deminsion
'* stored as a value in the corresponding position of the array.
'*
'* Example: aryMDUbound(aryTemp(2,3,4), aryReturn) would return aryReturn
'* as follows. aryReturn(1)=2, aryReturn(2)=3, aryReturn(3)=4
'*
'* Notes: The peformance of this function will vary depending on the
'* number of dimensions in aryAny.
'*
'* Calls:
'* aryDeminsions
'*
'* Changes:
'********************************************************************
Sub aryMDUbound(ByRef aryAny, ByRef aryReturn)
'Version 1.0 2009-01-18
Dim numDimensions
numDimensions = aryDimensions(aryAny)
ReDim aryReturn(numDimensions)
For x = 1 to numDimensions
aryReturn(x) = UBound(aryAny, x)
Next 'x
End Sub 'aryMDUbound