Creating DLL - ActiveX component can't create object

T

Tammy

I've been going through Google Groups searching for the problem I'm
having and there are heaps of posting which I've been through and
tried but am still having problems. Figured it was time to admit
defeat and post the problem.
I am a newbie .net programmer who has created dlls in VB6 but this is
my first .net try. I've read through the groups and worked out most
of what I've done wrong but still get the above error when trying to
use the .tlb file in Word.

This is what I've done -
1. Created a com class with my code in it and ticked the "Register
for COM Interop" option.
2. Built and tested the code both in a .net application and in Word
on my laptop (where it was created). Worked in both.
3. Ran tlbexp and regasm and then copied the tlb. and dll file to a
client pc and tested. No joy although intellisense did pick up
everything it should. The client pcs have the .net framework.
4. Ran REGTLIB on the client pc. Same problem.
4. Tried creating a strong name but when I rebuilt, it wouldn't work
because of the reference to Office and Word. I removed those but then
the code errored as it needed those references.

My boss just rang and suggested that the .net framework be removed
from the pcs (which are first unplugged from the network) and then
reinstalled from the cd. He thinks it's a problem with the framework
and version of VB.net I'm using but I'm not convinced this is the
case.

If anyone can help me I will be forever grateful! I've been working
on this problem for a week and it's driving me crazy. I just don't
know .net well enough to work it out.


Thanks
Tammy
 
K

Ken Tucker [MVP]

Hi,

I doubt that reinstalling the framework will help you here.
Regasm.exe is the only tool you need to use to register a .net dll for use
with vb6. Make sure you have the same version of office on both the
development pc and clients pc.

http://msdn.microsoft.com/library/d...ml/cpgrfassemblyregistrationtoolregasmexe.asp

Ken
-----------------
I've been going through Google Groups searching for the problem I'm
having and there are heaps of posting which I've been through and
tried but am still having problems. Figured it was time to admit
defeat and post the problem.
I am a newbie .net programmer who has created dlls in VB6 but this is
my first .net try. I've read through the groups and worked out most
of what I've done wrong but still get the above error when trying to
use the .tlb file in Word.

This is what I've done -
1. Created a com class with my code in it and ticked the "Register
for COM Interop" option.
2. Built and tested the code both in a .net application and in Word
on my laptop (where it was created). Worked in both.
3. Ran tlbexp and regasm and then copied the tlb. and dll file to a
client pc and tested. No joy although intellisense did pick up
everything it should. The client pcs have the .net framework.
4. Ran REGTLIB on the client pc. Same problem.
4. Tried creating a strong name but when I rebuilt, it wouldn't work
because of the reference to Office and Word. I removed those but then
the code errored as it needed those references.

My boss just rang and suggested that the .net framework be removed
from the pcs (which are first unplugged from the network) and then
reinstalled from the cd. He thinks it's a problem with the framework
and version of VB.net I'm using but I'm not convinced this is the
case.

If anyone can help me I will be forever grateful! I've been working
on this problem for a week and it's driving me crazy. I just don't
know .net well enough to work it out.


Thanks
Tammy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top