vba runtime error '-2147221164 (80040154)': Unregistered class

Asked

Viewed 269 times

0

i made a class library in visual studio 2019 using the . NET framework which is registered for COM interoperability and generates a file (.tlb). It was programmed in VB.NET and has a simple class with a simple method (class calculate, Soma method):

inserir a descrição da imagem aqui

It was possible to include the tlb file as reference in the VBA where I have a code that uses methods of this class to give action to a button:

inserir a descrição da imagem aqui

However, when executing the error happens:

inserir a descrição da imagem aqui

When I click on debug it points to the class instance:

inserir a descrição da imagem aqui

While consulting Stack I found other people with the same problem but no solution:

https://stackoverflow.com/questions/38570140/adodb-connection-in-vb6-open-method-fails-with-runtime-error-2147221164-8004

https://stackoverflow.com/questions/62239548/vba-selenium-class-not-registered-80040154

I have already performed a repair in my office coming to uninstall to install again, could help me to solve this error that prevents the execution of my library in excel VBA?

  • It is necessary to use 'calculator' to find the obj 'calculate' since this file has already been put as reference?

  • 1

    In one of the attempts I removed the 'calculator' leaving so: Dim objCalc As calculate/ Set objCalc = New calculate but the error remained ...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.