I have a simple function like so
public function myFunc(r as range) as variant
...
end function
which I can happily call like so
=myFunc(A1:A10)
Works just fine.
I wish to call the function like so
=myFunc(A1:A10+B1:B10)
It will not work. Anyone got any ideas? It works with Excel functions like index(), say. Also, when I click on Fx (the function wizard), it shows me that a range (which is the sum of each row 1..10) goes into myFunc.
I am at a loss. I tried "ByVal r as Range) (thinking that perhaps a reference may not be appropriate), but no joy (won't even enter myFunc). Similarly, "r as Variant" (while at least entering the code) gives nothing useful (contains Error 2015).
Any help appreciated.