I have a excel function defined in a module which is called a total of two times as a worksheet functon. However when I do a shift+f9 and place a breakpoint on the function, i noticed that its getting called more than twice, around 5 times. This function however is not being called anywhere else, both programmatically or in any worksheet except for the two cells i mentioned above.
我有一个在模块中定义的excel函数,它被称为工作表函数的两倍。然而,当我执行shift + f9并在函数上放置一个断点时,我注意到它被调用了两次以上,大约5次。但是,除了上面提到的两个单元格之外,这个函数不能以编程方式或在任何工作表中的任何其他位置调用。
Furthermore, when I look at the call stack when execution hits my function, it shows just my function being the top level call. Any help regarding what may be causing this? Thanks.
此外,当我在执行命中我的函数时查看调用堆栈时,它只显示我的函数是*调用。有关可能导致此问题的任何帮助?谢谢。
1 个解决方案
#1
3
There are many possible reasons for this but probably the most likely is the UDF being called with uncalculated cells:
see http://www.decisionmodels.com/calcsecretsj.htm for details
造成这种情况的原因有很多,但可能最有可能是使用未计算的单元调用UDF:有关详细信息,请参阅http://www.decisionmodels.com/calcsecretsj.htm
#1
3
There are many possible reasons for this but probably the most likely is the UDF being called with uncalculated cells:
see http://www.decisionmodels.com/calcsecretsj.htm for details
造成这种情况的原因有很多,但可能最有可能是使用未计算的单元调用UDF:有关详细信息,请参阅http://www.decisionmodels.com/calcsecretsj.htm