473,408 Members | 2,030 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,408 software developers and data experts.

COM usage problem?

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

Apr 19 '06 #1
2 4481
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

"Dursun" <Du****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
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

Apr 19 '06 #2
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

"VJ" wrote:
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

"Dursun" <Du****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
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


Apr 19 '06 #3

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

Similar topics

3
by: Vincent | last post by:
Hi I have a problem with pear DB my code : for ($i=0;$i<100000;$i) { $sql = "select id from table where id=x";
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
3
by: Dan | last post by:
First, I'm sorry if this question has been asked too many times. I'm new to this news group. The question has to do with the use of popup windows in a web page. I have heard that popup windows...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
7
by: Clement | last post by:
hi, i have an asp.net site and is using SQL Server 2k. i realize the aspnet_wp.exe memory usage keep growing and i will receive an error for the pages that call the sql connection. others page...
2
by: Fish | last post by:
I have been researching the correct way to organize my solution so that it makes best use of VB.NET inherent ability to manage resources such as objects. My solution contains 2 projects and the...
1
by: Damien | last post by:
Hi guys, I'm looking for ideas for troubleshooting the following. We've tried some random things to try to treat the symptoms, but none seem robust enough to use when we go live, and we'd rather...
4
by: jiang.haiyun | last post by:
Hello all, when i import SOAPpy, the python crashed and print out 'usage:copy source destination'. As follows: ############################ haiyun# python Python 2.4.1 (#2, Mar 28 2006,...
2
by: jld | last post by:
Hi, I developed an asp.net based eCommerce Website for a client and it is hosted at discount asp. The site is quite interactive, queries a database a lot and uses ajax.asp.net to spice up...
6
by: =?Utf-8?B?bGlnaHRkb2xs?= | last post by:
Hello everyone. i want to know how to decrease the cpu usage in my program. i have to update quickly many data on gui, so i tried to decrease the cpu usage on gui but i couldn't solve the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.