0

Need help writing VBA code that talks to excel

May 11, 2017 at 04:40 PM

28

avatar image

Good afternoon Everyone,

I have been trying to use the following code through excel to talk to SAP, however I keep getting a "automation error, invalid syntax" error code.

Public Sub SimpleSAP()

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

end sub
10 |10000 characters needed characters left characters exceeded

Hi,

Below link help

https://archive.sap.com/discussions/thread/3442315

thanks,

Jothi

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content