cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ActiveX component can't create object - error 429

Vijay
Active Contributor
6,999

stefan.schnell , sandra.rossi

Hi,

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

Accepted Solutions (1)

Accepted Solutions (1)

Stefan-Schnell
Active Contributor

Hello vijay.sharma4,

your first AppID entry is at the wrong position. AppID value must be direct set at the GUID key, not in InprocServer32 key as in your case.

I tried it with wdtfuncu.ocx, the unicode variant of wdtfuncs.ocx, and it works as described.
It it not necessary to delete the DllSurrogate value at HKLM hive, as Sandra wrote, it is an automatic copy which does not hinder the function. After all, the description is more than six years old, I assume that the automatic duplication of entries in the registry did not exist at this time yet.

Best regards
Stefan

Vijay
Active Contributor
0 Likes

Thanks stefan.schnell for coming in for rescue :).

The correction that you mentioned fixed the object creation issue, but still not able to connect to SAP . getting the below exception.

Sandra_Rossi
Active Contributor
0 Likes

vijay.sharma4 Please open a new question and close this one after marking it "accepted". I guess the error is on R3Connection.Logon. Also mention what you get if you don't log in silently.

Vijay
Active Contributor
0 Likes

Sure sandra.rossi and thanks for your help with this. I am opening a new issue for connection error. Will loop you in that.

Answers (0)