Thread: type mismatch
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default type mismatch

Hi V,

'---------------
It works fine, many thanks.

However, I cannot still understand why I have to use an intermediate
variant array "arr" instead of using directly the function name "b",
since both of them are variant. Where is the difference between the
two?
'---------------

You have named your function as b and the
function expects a single range argument.

Therefore, attempting to pass multiple Integer
(or Long) values in the line:

b(i, j) = b(i, j) + 1


will cause the encountered problem.


---
Regards,
Norman


Norman,

It works fine, many thanks.

However, I cannot still understand why I have to use an intermediate
variant array "arr" instead of using directly the function name "b",
since both of them are variant. Where is the difference between the
two?

Thanks again