下面是帮助文件中的一个自定义sum函数,为何在定义后调用显示“自定义函数sum执行出错”
Dim Code As string Code = "Dim Val1 As Integer = 1" & vbcrlf Code = Code & "Dim Val2 As Integer = 2" & vbcrlf Code = Code & "Dim Sum As Integer = Val1 + Val2" & vbcrlf Code = Code & "Return Sum" Functions.Add("Sum",Code) Functions.Complie()