COM usage problem?

G

Guest

I have created a COM class library in VS2005 useing VB.Net. Everything seem
to be OK with the creation. I created a new VB Win project, and wanted to use
the component (a function, not a control). When I try to include this COM
library into my project, I get the error that reads

--------------------
A Reference to XYZ could not be added.
The ActiveX type library 'C:\...\XYZ.tbl' was exported from a .NET assembly
and cannot be added as a reference.
Add a reference to the .NET assembly instead.
--------------------

ANY HELP COMMENTS...

ALSO, can I use this COM library from within a VB macro in Excel? I tried...
I can see and add the reference (no problem), instantiate it, called a
public function of the class (no problem) but then, when I run the macro it
is giving me the following error:

----------------
Compile error:
Function or interface marked as restricted, or the function uses an
Automation type not supported in Visual Basic
-----------------

PLEASE COMMENT!

Thanks,

Dursun
 
V

VJ

Why would you create a COM dll in .NET and use it back in .NET ... just out
of curiosity.. why can't it be a DLL..

VJ
 
G

Guest

To have it easily available to other users/programmers who might be using it
in Office application macros. Also. I wanted it to be listed in the COM tab
of the reference dialog box.

Do you have any suggestion?

Thx,

D
 

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