Skip to Content
0
Dec 31, 2021 at 07:13 PM

ActiveX Component Error (429) on SAPGUI

105 Views Last edit Dec 31, 2021 at 07:25 PM 2 rev

Hi,

I've been trying to troubleshoot why I cannot gain access to the SAP GUI through VBA. I came across this similar question sap gui scripting activex 429 error | SAP Community, however I am currently working with 32-bit excel (Office 365). When trying to connect to the SAP GUI, I am hit with "Run-time error '429': ActiveX component can't create object." I have been using just this simple code in order to try and establish the connection:

Option Explicit
Public sapgui, wscript, msgcol
Public ObjGui as GuiApplication
Public ObjConn as GuiConnection
Public session as GuiSession
-----------------------------------------------------------
Sub ConnectSAP()
Set SapGui = CreateObject("SAPGUI") '(This is where the 429 error occurs)
End Sub
----------------------------------------------------------

Steps I've taken/observations:

I've included the SAP GUI Scripting API (sapfewse.ocx) in the VBA references panel

I've noticed that other SAP functions work without issue (i.e. CreateObject("SAP.Functions"))

I've noticed that in the loaded DLLs information from within the SAP GUI, I do not see sapfewse.ocx listed (unsure if I should)

Additional research has been mentioning the possibility of having to update registry keys, but am unsure how to safely do this, and would pursue this option once I know I'm not missing something else here.

The SAP GUI version is 760

Windows 10 Enterprise 6.2

Any help is amazing appreciated, would go a long way to unlocking so many automation projects with VBA