#REF Error when calling VBA Function
#REF Error
I retrieved a VBA function (for astronomy) from the web that calculates the Julian day number for a specified date. If I call this function from a spreadsheet it is recognised by Excel (the Insert Function also sees it) but returns a #Ref error for any entry.
I created a Test sub() and called the function, thus allowing me to step through it and display the result in a message box. It correctly evaluated, and displayed, the function result for my input.
The function contains no cell references; it justs performs straightforward arithmetical calculations based on six input parameters.
Can anyone please suggest, what the problem may be?
I am using Excel 2016 on Windows 10.
Many thanks.
|