View Single Post
 
Old 01-21-2016, 06:37 AM
RodneyJ RodneyJ is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Mar 2012
Posts: 5
RodneyJ is on a distinguished road
Default #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.
Reply With Quote