excel udf被多次调用 [英] excel udf being called too many times

查看:106
本文介绍了excel udf被多次调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在模块中定义了一个excel函数,该函数总共被称为两次工作表功能.但是,当我执行shift + f9并将断点放在函数上时,我注意到它被调用了两次以上,大约5次.但是,无论是通过编程方式还是在任何工作表中,均未在其他任何地方调用此函数,但上面提到的两个单元格除外.

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.

此外,当我看到执行力触及我的函数的调用堆栈时,它仅显示我的函数是顶级调用.关于什么可能导致此的任何帮助?谢谢.

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.

推荐答案

有许多可能的原因,但最有可能的原因是未计算单元格调用了UDF:
有关详细信息,请参见 http://www.decisionmodels.com/calcsecretsj.htm

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

这篇关于excel udf被多次调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆