Author Topic: Error 429; ActiveX component can't create object.  (Read 20693 times)

Offline harrysally

  • Newbie
  • *
  • Posts: 1
    • View Profile
Error 429; ActiveX component can't create object.
« on: September 18, 2008, 11:07:17 »
I install Hugin Researcher 6.8 and Excel 2007. And I also add the HUGIN ActiveX library to the references in VBA of Excel.

But when I run the program in EXCEL VBA, it always shown that "Error 429; ActiveX component can't create object."

I reinstall Hugin Researcher v. 6.8 again, but the problem is still there. How can I solve this problem?

Thanks a lot.

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: Error 429; ActiveX component can't create object.
« Reply #1 on: September 19, 2008, 10:43:38 »
Quote
Error 429; ActiveX component can't create object.

This error typically occurs when one is moving code utilizing the Hugin ActiveX API from Visual Basic .NET to Visual Basic 6.0. (note: Use of the ActiveX API in VB .NET in the first place is unsupported by Hugin - use the .NET API instead!)

Why?
When using the ActiveX API in Visual Basic .NET, one is forced to make a little hack in order to call the GlobalMultiUse functions of the API as VB .NET does not support this type of property. This is usually done by creating an instance of HAPI.Globals:
Code: [Select]
Set glob = CreateObject("HAPI.Globals")And functions are invoked like:
Code: [Select]
glob.<function-name>

The Solution
The solution to the problem is to discared the line
Code: [Select]
Set glob = CreateObject("HAPI.Globals")And rename all
Code: [Select]
glob.<function-name>bringing the function calls to their proper form as intended for VB 6.0:
Code: [Select]
HAPI.<function-name>
Hugin Expert A/S