以下是引用刘海屋在2014-10-10 20:33:00的发言:
你好。我写全一个简化的自定义函数和其调用如下:
1。自定义函数(函数名=New_EmailWithNoAttachment):
Dim New_EmailWithNoAttachment() As String = Args(2)
Dim Pnl2 As WinForm.Panel = Forms(Args(0)).Controls(Args(1))
Pnl2.Visible = True
2. 调用程序为:
Functions.Execute(("New_EmailwithNoAttachment"), "New_CommuW", "Pnl2")
3。错误信息为:
自定义函数“New_EmailWithNoAttachment"执行出错,错误信息如下:
System.IndexOutOfRangeException索引超出了数组界限
在UserCode.AE.....Azw(Objet[]Args)
请帮助分析错误在哪里,万分感谢。
刘海屋
函数中定义三个参数,调用的时候,给两个,这个还不出错?
再说了:
Functions.Execute(("New_EmailwithNoAttachment"), "New_CommuW", "Pnl2")
调用应该是这样的:
Functions.Execute("New_EmailwithNoAttachment", 参数1,参数二,参数三)
[此贴子已经被作者于2014-10-11 18:02:00编辑过]