473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Creating DLL - ActiveX component can't create object

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
Nov 21 '05 #1
2 6179
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/de...lregasmexe.asp

Ken
-----------------
"Tammy" <ta**********@alemy.com.au> wrote in message
news:3a**************************@posting.google.c om...
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
Nov 21 '05 #2
Tammy,
Did you ever get this working, I am having the same problem and am starting to pull my hair out.

Jeff

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/de...lregasmexe.asp

Ken
-----------------
"Tammy" <tammy.djuric@alemy.com.au> wrote in message
news:3aee9baa.0504202009.10dbf07e@posting.google.c om...
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
May 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joe | last post by:
I've been running into problems when trying to create a Virtual FTP folder in ASP.Net. I've tried it a few ways but none of them has worked so far. I have identity impersonation turned on, and the...
2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
19
by: Steve | last post by:
Can anyone point me to a primer for creating OCX controls in VB .net? In particular, I want to access a web service in a VB6 application (not an easy thing to do). So, if I can write an ActiveX...
2
by: Berata | last post by:
Hello all, in VB6 we were able to create ActiveX-DLL's (In Process Components) and ActiveX-Exe's (Out of Process Components). We habe build up an application that exists of an main module...
8
by: mcmg | last post by:
Hi, I have an asp app that works fine on a windows xp machine but does not work on a windows 2000 server. I have the following code in my global.asa: <OBJECT RUNAT=Server SCOPE=SESSION...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
3
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
4
by: Wilfried Mestdagh | last post by:
Hi, I have a C# application (VS2005) with Microsoft Mappoint activeX control on a form. At a certain moment I want to create a second one temporary in code. This seems not to work, when I try to...
8
by: Daniele Piccinini | last post by:
Hi all, In my vc++ 2005 dialog based application i need to use a comunication activex component in a secondary thread: CFINSAxEFS* pNewAx = new CFINSAxEFS(); if ( !pNewAx->Create( NULL,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.