This is the code:
As long as I'm in the workbook where this function exists, it returns correct values. If I go to a different book and force a recalculation, then the function returns #VALUE!![]()
Please Login or Register to view this content.
This is the code:
As long as I'm in the workbook where this function exists, it returns correct values. If I go to a different book and force a recalculation, then the function returns #VALUE!![]()
Please Login or Register to view this content.
How are you calling it from the other workbook?
The other workbook does not use the UDF in any way, and the UDF does not refer to cells in the other workbook. The UDF is just in a single workbook.
Oh, I see, you have a UDF defined and used in one workbook, but when a different workbook, which has nothing to do with the UDF, is recalculated, the UDF returns #VALUE.
I have never seen that problem. Is there anything unusual about either file? How are you forcing recalculation--hitting F9, or in code?
I changed this:
to this:![]()
Please Login or Register to view this content.
and that worked.![]()
Please Login or Register to view this content.
I strongly suggest you revisit your post from yesterday, read post #2 from MrShorty and then implement it. It will save you a lot of problems like this in the future.
Everyone who confuses correlation and causation ends up dead.
Ordinarily, I would do as suggested, but this particular UDF has non obvious inputs which never change. Thanks for the help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks