none
In VB.Net developed TLB - functioning on developer computer but not on other computers RRS feed

  • Question

  • I have a problem. I have developed a COM-CLass in VB.NET  (VS Proffesional 2013). This should be used in Excel.

    On my computer it functions, as I imagined it to be. :)          .....However not on other PCs. :(

    In VBA Excel 2010 I set the Reference,  but immediately by "Set x = New ClassLibrary1.ComClass1" I get the ERROR 429: "activex component can't create object"

    What do I miss on that other computer? I would say perhaps Registration of the "tlb" file. But I didn't get to register it with regasm. On my developer computer I did't need to do anything after compiling the DLL and Excel can use it.

    So, what is the detail missing? Thank you for answer.

    Wednesday, October 7, 2015 1:48 PM

Answers

  • Thank you cheong00. It was even more primitiv than "32/64 bit" problem.

    Solution: I had to register both folowing:

    - C:\Windows\Microsoft.NET\Framework\v4.0.30319> regasm.exe D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.dll /codebase

    - C:\Windows\Microsoft.NET\Framework\v4.0.30319> regasm.exe D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.dll /tlb:D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.tlb

    Types registered successfully.

    Thanks god!

    • Marked as answer by DinFFM Friday, October 9, 2015 10:48 AM
    Friday, October 9, 2015 10:48 AM

All replies

  • You'll need to register the DLL on the target system. The IDE will register it on behalf of you once it got compiled so you don't need to do it youself.

    Also, if you'd somehow limited the type of platform your DLL is targeting (say, you set it manually to x86/x64 or "add reference"-ed a DLL that is 32/64 bit only, it has to match the "bitness" of VBA runtime for it to be loaded.

    Thursday, October 8, 2015 1:20 AM
    Answerer
  • Thank you cheong00. It was even more primitiv than "32/64 bit" problem.

    Solution: I had to register both folowing:

    - C:\Windows\Microsoft.NET\Framework\v4.0.30319> regasm.exe D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.dll /codebase

    - C:\Windows\Microsoft.NET\Framework\v4.0.30319> regasm.exe D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.dll /tlb:D:\Programme\Rechenclients\rms\Programme_WIN7\ClassLibrary1\bin\Debug\ClassLibrary1.tlb

    Types registered successfully.

    Thanks god!

    • Marked as answer by DinFFM Friday, October 9, 2015 10:48 AM
    Friday, October 9, 2015 10:48 AM