请教:vba中引用另一个自定义函数,请问应该是什么格式?
由于在perl中自定义的函数,其参数自带Formula 对象,是不是需要有个Formula参数?这个自定义函数是公式编辑器中新建的。
需要指定一个Formula对象,我用的下面的方法获得,比较繁琐,不知道有别的简单的办法么?
Sub TEST()
N=Technic.GridCount
for i=0 to N-1
set Grid=Technic.GetGridByIndex(i)
Label=Grid.StockLabel
M=Grid.FormulaCount
TP=Grid.TYPE
if Label="M05" and TP=1 and M>0 and instr(Grid.name,"Window")>0 then '根据副图的几个特点定位副图
set Formula=Grid.GetFormulaByName("BBB")
BOTP Formula,参数1,参数2
set Grid=nothing
set Formula=nothing
exit sub
END IF
next
End Sub