Skip to Content
Aug 24, 2020 at 03:42 PM

ActiveX component can't create object - error 429

998 Views Last edit Aug 24, 2020 at 04:06 PM 2 rev

Stefan Schnell , Sandra Rossi


I am trying to call SAP Functions in Excel for MS Office 365 (64bit) and getting the error "ActiveX component can't create object - error 429" on execution.

I tried the registry hacks as are suggested by Stefan here , but still getting the error.

Below are the steps i performed.

  • Locate your COM object GUID under the HKey_Classes_Root\Wow6432Node\CLSID\[GUID]
  • Once located add a new REG_SZ (string) Value. Name should be AppID and data should be the same COM object GUID you have just searched for

  • Add a new key under HKey_Classes_Root\Wow6432Node\AppID\
    The new key should be called the same as the com object GUID
  • Under the new key you just added, add a new REG_SZ (string) Value, and call it DllSurrogate. Leave the value empty

  • Create a new Key under HKey_Local_Machine\Software\Classes\AppID\
    Again the new key should be called the same as the COM object’s GUID. No values are necessary to be added under this key. (This entry was already existing with below values. I Guess automatically generated?? and with string Name DllSurrogate... Do i need to delete DllSurrogate entry from here?)

Below is the VB code i am trying with

Option Explicit

Public Functions As SAPFunctionsOCX.SAPFunctions
Private LogonControl As SAPLogonCtrl.SAPLogonControl
Private R3Connection As SAPLogonCtrl.Connection
Public TableFactory As SAPTableFactory
Dim Func As SAPFunctionsOCX.Function
Dim objBAPIControl, objgetaddress As Object

Sub Button1_Click()
Dim retcd        As Boolean
Dim SilentLogon  As Boolean

' Set Connection
Set LogonControl = CreateObject("SAP.LogonControl.1")
Set objBAPIControl = CreateObject("SAP.Functions")
Set R3Connection = LogonControl.NewConnection
R3Connection.Client = "100"
R3Connection.ApplicationServer = "<saphost>"
R3Connection.Language = "EN"
R3Connection.User = "<username>"
R3Connection.Password = "<password>"
R3Connection.System = "<SID>"
R3Connection.SystemNumber = "<SNUMBER>"
R3Connection.UseSAPLogonIni = False
SilentLogon = False
retcd = R3Connection.Logon(0, SilentLogon)
If retcd <> True Then MsgBox "Logon failed": Exit Sub
objBAPIControl.Connection = R3Connection
End Sub

and below is the error i am getting


1.png (22.4 kB)
2.png (19.2 kB)
3.png (19.2 kB)
4.png (51.4 kB)