>' ************************************************************** >' GetArrayWidth: This function Return the width of array elements >' Author: Joe Johnston 6/14/2001 >' Parameters: aArray - Array to be checked >' ************************************************************** >Public Function GetArrayWidth(aArray) as integer > Dim i As Integer, x > 'Dim aArray(3, 1 To 10, 1 To 15, 25) ' for testing > > On Error Resume Next ' dont stop on error > For i = 1 To 32000 ' 32000 max should more than enough > ' didn't Bill Gates say something > ' similar about 640K ?? > x = UBound(aArray, i) ' a call might work here > If Err.Number = 9 Then Exit For ' wait for the overflow > Next i > > GetArrayWidth = (i - 1) ' return the last good value >End Function >