Skip to Content
0
Dec 23, 2022 at 10:27 AM

Add-on 9000006 failed with exception; Event Type: 18

39 Views Last edit Dec 23, 2022 at 11:25 AM 5 rev

Public Sub ConnectToCompany()
        Try
            objCompany = New SAPbobsCOM.Company
            objCompany = SBO_Application.Company.GetDICompany
            If objCompany.GetLastErrorDescription.Length > 0 Then
                SBO_Application.MessageBox(objCompany.GetLastErrorDescription)
            Else               
                WriteLog("User " & objCompany.UserName & " logged in at " & Format(Date.Now, "dd/MM/yyyy hh:mm tt"))
            End If
        Catch ex As Exception
            WriteLog("Service:ConnectToCompany()=" & ex.Message & vbNewLine & "Line=" & ex.StackTrace)
        End Try
    End Sub

I have written this function for connecting to company. I am getting error after this code,
objCompany = SBO_Application.Company.GetDICompany
I am getting error as ,
Add-on 9000006 failed with exception; Event Type: 18
I have debugged my code and I am getting error after the above specified code.