【发布时间】:2018-06-20 17:02:21
【问题描述】:
所以几个月前我在 SAP GUI 7.30 上做了一些宏,但我的公司最近要求每个人都更新到 SAP GUI 7.40。我的宏都不再工作了,因为它在连接到 SAPGUI 时遇到了某种问题。
到目前为止,我一直使用此代码将 excel 连接到 SAP
Set SapGuiAuto = GetObject("SAPGUI") 'Get the SAP GUI Scripting object
Set SAPApp = SapGuiAuto.GetScriptingEngine 'Get the currently running SAP GUI
Set SAPCon = SAPApp.Children(0) 'Get the first system that is currently connected
Set session = SAPCon.Children(0) 'Get the first session (window) on that connection
但现在我在第一行之后收到错误:'-2147221020 (800401e4)' 这是一个自动化错误和无效语法。
有谁知道我可以如何更新我的工作表来解决这个问题?
【问题讨论】:
-
有谁知道对象“SAPGUI”是从哪里拉出来的?此时我唯一的想法是该文件/程序不再存在于该位置,因此我正在尝试确定在哪里进行检查。