问题描述
The enumerator of the collection cannot find en element with the specified index.
我在以下代码的第3行上收到上述错误:
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
Set connection = application.Children(0)
如何检查申请的大小。孩子?
解决方法
可能未打开SAP(SAP登录/ SAP GUI)。
但是,如果需要,请尝试:
ChildCount = application.Children.Count