79106756

Date: 2024-10-20 09:55:23
Score: 1
Natty:
Report link

The error you're encountering, Runtime error -2147221020 (800401e4) Automation error Invalid Syntax, typically indicates that the GetObject function is not able to retrieve the active SAP GUI

  1. Check SAP GUI Scripting is Enabled
  2. Ensure SAP Logon is Running as Administrator
  3. Use CreateObject Instead of GetObject Set SapGuiAuto = CreateObject("SAPGUI") If Not IsObject(SapGuiAuto) Then MsgBox "SAP GUI could not be started." Exit Sub End If
  4. Check if SAP GUI is Running
  5. Verify 64-bit vs 32-bit
  6. Reinstall SAP GUI
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ishika Nahar