我写的代码如下:
━┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉━- Option Explicit
- Call main()
- Function main()
- Dim tmpObj
- tmpObj = RetObj()
-
- End Function
-
- Function RetObj()
- Dim WshShell
- Set WshShell = WScript.CreateObject("Wscript.Shell")
- RetObj = WshShell
- End Function
复制代码 运行报告错误
━┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉━
我的问题:
━┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉┉∞┉┉┉┉┉┉┉━
RT,怎么才能正确的返回对象呢,请不要使用全局变量。谢谢大家的帮助 |