Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel VBA将字符串作为特定范围内的函数进行求值_Excel_Vba - Fatal编程技术网

Excel VBA将字符串作为特定范围内的函数进行求值

Excel VBA将字符串作为特定范围内的函数进行求值,excel,vba,Excel,Vba,各位。我有点问题。我编写了一个函数,它以字符串作为参数,表示函数名和参数数组。我将函数名存储在括号中的所有参数后面,并用逗号分隔。然后调用Evaluate函数并将此变量传递给它。当我传递在全局范围中定义的函数名时,它工作正常,但我希望能够调用在我编写的类中定义的私有函数。有什么建议吗 私有函数fAsStringfname作为字符串,ParamArray参数作为变量 tx=fname& 对于i=0到UBoundarguments it=i 如果TypeNameit=String,则 它=&LCa

各位。我有点问题。我编写了一个函数,它以字符串作为参数,表示函数名和参数数组。我将函数名存储在括号中的所有参数后面,并用逗号分隔。然后调用Evaluate函数并将此变量传递给它。当我传递在全局范围中定义的函数名时,它工作正常,但我希望能够调用在我编写的类中定义的私有函数。有什么建议吗

私有函数fAsStringfname作为字符串,ParamArray参数作为变量 tx=fname& 对于i=0到UBoundarguments it=i 如果TypeNameit=String,则 它=&LCaseit& ElseIf TypeNameit=日期 it=DateValue&Monthit&&Dayit&&Yearit& 如果结束 tx=tx&it&IIfi=UBoundarguments_ , _ , 下一个 fAsString=Evaluatetx
这不是一个好问题。堆栈更改中有一个代码检查站点,如果您正在寻找有关代码的一般反馈,您可以查看该站点。@ebrts我认为它适合,只是没有那么好的措辞。他不是在寻求反馈,而是在调用Evaluate时寻找范围界定工作的方向。不幸的是,我不知道。