cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing SAP using Excel VBA - Invalid Syntax Error

former_member718914
Discoverer
0 Kudos
1,679

Hello,

We want to run SAP Script from Excel VBA programming. We are getting error message while executing scripts at following line of code:

SAP Version: 7.6

Excel Version: 365 Pro Plus

If objGui Is Nothing Then

Set SapGuiAuto = GetObject("SAPGUI")

Set objGui = SapGuiAuto.GetScriptingEngine

End If

Error Message:



VBA References added :

Please suggest how to resolve this issue.

Accepted Solutions (0)

Answers (2)

Answers (2)

Stefan-Schnell
Active Contributor

Hello Parvez,

the error 800401e4 means that you can't get the object from the running object table (ROT). Be sure that your SAP Logon is open, that SAP GUI Scripting is installed and activated, on the client and server side.

If all these conditions apply, you should also get the object from the ROT.

Best regards
Stefan

former_member718914
Discoverer

Hi Sandra,

Thanks for response. Pls find attached error screenshot and reference added to Excel.

nachodrums
Explorer
0 Kudos

Hello.

What happens if I don't have SAP GUI Scripting API or SessionMsgLib? I am running on Citrix Reciever App