Function max1(Formula,a1,a2,a3,a4,a5)
dim x1
x1=a1
if x1<a2 then x1=a2
if x1<a3 then x1=a3
if x1<a4 then x1=a4
if x1<a5 then x1=a5
Max1=x1
End Function
在 if x1<a2 then x1=a2 处提示:类型不匹配,编译器错误13
5个参数用整数,测试可以,放到公式中,成为小数,就出现错误了
if 语句结尾要以 end if 配对
金字塔的PEL语言,所有变量都是浮点数,不知道你所指的错误是什么错误,建议进一步细化问题描述,以便于我们给出正确解决方案
如果你是以序列模式调用的这个VBS函数的话,a1是个数组,不能这么用,你试试改为逐K线模式使用