ActiveX component can’t create object Error (Com Class / VBA)


I have created a Class Library project.  To this I have added a Com Class Item.  Within this I have added a few simple functions.

I then compile this as Release and I get a DLL and a tlb file.

I then reference these with Access 2003 VBA and then create an object of class and therefore have access to .net functions within a VB6 environment.

This works perfectly on my primary machine.

I now need it to work on my laptop.  I assumed that if I copied the tlb file across and then added a reference in the same way as above all would be well.  Unfortunately it does not work. Instead I get the following error:

Run-Time error ‘429’:
ActiveX component can’t create object

Does the laptop need Visual Studio in order for this to work?  Any suggestions as to how I can get this to work appreciated.

(I’ve tried copying the entire contents of the  bin\Release folder but this does not work either)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You need to register the COM object

Use following at command line

Regsvr32 pathandnameofdll
You will need the .NET framework and you will have to register the class using regasm.exe you don't have this problem on the development machine because you might have the option "Register for COM interop" checked which does all the registration when you build.
Assembly Registration Tool (Regasm.exe)
andyw27Author Commented:
Tried the Regsvr32 D:\Release\Class_MD5.dll command but got an error of:

...dll was loaded but the entry-point DllRegisterServer was not found.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Do you have .NET framework installed?
andyw27Author Commented:
I've done this several times.
Best option is to create an installation package:
Open the solution in VS
Goto File | Add | New Project
In the "add new project" window:
Select Other Project Types | Setup and Deployment
Select "Setup wizzard" in the templates list
Follow the wizzard to create the installation project
Once your installation wizzard finished, compile the setup project.
In the output folder you will find the installation files
use these to install on your other machines.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andyw27Author Commented:

Many thanks for your comments.  It worked like a dream and saved me many hours in trying to figure out the particulars of why this was not working.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.