View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Declaring arrays

Harlan Grove wrote:
. . .
I've also done some testing with Assign. The ArrayDimensions call and
running the entire function with error trapping enabled appear to be the
main causes of slower execution time. . . .


I substituted out the ArrayDimensions call, replacing it with the structure

On Error GoTo EndDims

lb1 = LBound(InputRange,1)
ub1 = UBound(InputRange,1)
NumDims = 1

lb2 = LBound(InputRange,2)
ub2 = UBound(InputRange,2)
NumDims = 2
..
..
..
EndDims: Err.Clear
On Error GoTo 0

and turned off all other On Error commands. It still ran an order of
magnitude slower than ct (15 times slower).

I'll study some more the looping to load the array. I don't yet have my
head around the "flow diagram" implicit in ct.

Alan Beban