VB 脚本动态创建变量返回错误 不支持自动化类型
我在包含文件中有变量列表,如下所示:
var_1 = "string"
var_2 = "string"
在主文件上,我需要动态创建变量,所以我
' somewhere i have the num variable
Execute("new_var = var_"&int(num))
确实在执行行上,我收到了此错误
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript
大家有什么想法吗?
谢谢
I have list of variables in an include files which is looks like:
var_1 = "string"
var_2 = "string"
on the main file i need variable created on the fly so i do
' somewhere i have the num variable
Execute("new_var = var_"&int(num))
Exactly on the execute line i got this error
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript
Any idea guys?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用数组来实现这种事情:-
Use arrays to acheive this sort of thing:-
我成功了,当我将类型转换为 num 变量时出现错误,
但
有效,谢谢
I made it, the error come up when i use casting type to the num variable
but
works, thanks