【发布时间】:2012-10-09 11:46:45
【问题描述】:
我正在尝试通过编写用户定义的函数来使 Excel 工作表更具可读性和更易于使用 我正在尝试转换这样的公式,
=If(IsErr(GetPivotData(Pivot Look up information here)),0,GetPivotData(Pivot Look up information here))
使用 vba 代码
pt.GetPivotData(Pivot Look up information here)
我在检测 VBA 中查找查询的问题时遇到了问题。在上面的公式中,这是使用 IsErr 函数处理的。我试过使用 IsError(pt.GetPivotData(Pivot lookup information here)),但程序因运行时错误“1004”应用程序定义或对象定义错误而崩溃。当我从没有 IsError 的 sub 调用函数时,我得到了同样的错误。
如何让 VBA 检测这些错误?
【问题讨论】:
标签: excel vba error-handling pivot