Hello.
Thanks for the tips, I've decided to write a macro
I've function with does calculations of the great circle distance, and it is working when called from spreadsheet.
I can call it from sub with direct values hard coded as function parameter.
I have, however got into trouble with looping the function.
Lets paste some code:
So this is the function, which takes 4 double variables plus two boolean ones.
I've no problem with calling it directly from spreadsheet or by passing direct values to it.
But when I try to get it looping then I hit a problem of data type mismatch.
The error happens when I'm trying to compile the code as compiler is saying ByRef argument mismatch.
I think I know why is it happening, function wants type double as parameter, but array vntarray return something else.
How do I pass values from two dimension array to a function and convert it to double to match function declaration ?
Any help would be appreciated.
Bookmarks