我正在尝试启动 SAP GUI 脚本并更改 VBA 代码的一些变量。
我明白了
运行时错误“424”需要对象
上Set session = Connection.Children(0)
Public Sub SimpleSAPExport()
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 = Connection.Children(0) 'Get the first session (window) on that connection
' Start the transaction to view a table
session.StartTransaction "SE16"
end sub