I can’t find how to pass a range to my “MyFirstValue” function.
I’ll give you a very simple example to explain.
In the cell:
“=MyFirstValue(A1:B20)”
In the function:
Function MyFirstValue(rng As Object) As string
oCell = rng.getCellByPosition(0, 0)
MyFirstValue = “MyFirstValue=” & oCell.Value
End Function
When I call the function I get this error message:
BASIC runtime error.
Object variable not set.