Says I have a function call "totalVal" which accomulates all the values inside a matrix according to the dimension values of x and y.

---------------------

Public Function totalVal ( byval Arr_x# ( , ), byval x%, byval y%) as double

Dim Val as double, i , j as integer

Val = 0

for i = 0 to x

for j = 0 to y

Val = Val + Arr_x(i, j)

next j

next i

Return Val

End function

---------------------

Calling the function in some other code.

---------------------

Val = totalVal ( ArrayX (, ), 4 , 4)

---------------------

For some reason VB doesn't allow me to input an implicited array like ArrayX(, ) into the function. Does anyone know how to get this to work.

thx in advance.