Error "Method '~' of object '~' failed" and "ActiveX Component can't create object"

Hi all,

I faced the issue at 1 or the user pc, her pc is Windows 10, 64 bits. When want to load the customization program, error will occurred in line sessMgr.CreateSession, it will prompted error  "Method '~' of object '~' failed" first, then only prompted error "ActiveX Component can't create object" but others pc will not have this issue. May I know anyone know how to solve this issue?

Public mSession As New AccpacCOMAPI.AccpacSession
Public sessMgr As New AccpacSessionMgr

Private Sub Form_Initialize()
     mSession.Init "", "CS", "CS0001", "63A"
     sessMgr.AppID = "CS"
     sessMgr.ProgramName = "CS0001"
     sessMgr.AppVersion = "63A"
     sessMgr.CreateSession "", 0, mSession
End Sub

Many thanks.

Parents
  • 0

    If this is happening on just one workstation then I'd look at what's different on that workstation.  UAC could be preventing your program from starting Sage.

    Also, for external apps, you should use XY for the AppID and XY0001 for the ProgramName. It apparently has a special meaning for the system manager. And you don't need to instantiate a session variable explicitly since sessMgr.CreateSession will do that for you.

Reply
  • 0

    If this is happening on just one workstation then I'd look at what's different on that workstation.  UAC could be preventing your program from starting Sage.

    Also, for external apps, you should use XY for the AppID and XY0001 for the ProgramName. It apparently has a special meaning for the system manager. And you don't need to instantiate a session variable explicitly since sessMgr.CreateSession will do that for you.

Children
  • 0 in reply to Django

    Only user pc with windows 10 (Sage PU1) will having this issue and already turn off UAC to never notify, others pc with windows 7 and my pc with windows 10 (PU3) are working fine with the customization program. May I know whether PU will affect it? Please kindly advise. Thanks.