473,385 Members | 1,397 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,385 software developers and data experts.

How to Reference a .Net Assembly from within VBA?

Hey All,

I want to create an assembly in .Net that I can reference and use in VBA.

I have a sample assembly that I've strongly named and that is loaded in the
GAC. However, I can not see from within VBA.

Please advise?

Thanks & Regards,

TC

Oct 27 '06 #1
3 4274
You don't reference .NET assemblies from COM applications. You'll need to
register you .NET assembly for COM InterOp and then re-build it. This will
create a COM Callable Wrapper assembly that you would then reference from
your VBA project as normal.
"TCook" <ge**********@yahoo.comwrote in message
news:Oh****************@TK2MSFTNGP03.phx.gbl...
Hey All,

I want to create an assembly in .Net that I can reference and use in VBA.

I have a sample assembly that I've strongly named and that is loaded in
the
GAC. However, I can not see from within VBA.

Please advise?

Thanks & Regards,

TC

Oct 27 '06 #2
"TCook" <ge**********@yahoo.comschrieb:
I want to create an assembly in .Net that I can reference and use in VBA.

I have a sample assembly that I've strongly named and that is loaded in
the
GAC. However, I can not see from within VBA.
You can implement the functionality in a .NET class library and expose the
functionality for COM interop:

..NET Framework Developer's Guide -- Exposing .NET Framework Components to
COM
<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp>

Visual Basic Language Concepts -- COM Interop
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconCOMInteroperability.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 27 '06 #3
Hey Guys,

Thanks for the advice. I figured out my problem. Although I had the class
tagged as a COM class and also had the assembly strongly named, I hadn't
signed the project or registered it for COM interop from within the
project's settings.

Once I signed and registered the assembly and rebuilt it, I was able to use
it from within VBA.

Thanks for the advice.

Best,

TC
"TCook" <ge**********@yahoo.comwrote in message
news:Oh****************@TK2MSFTNGP03.phx.gbl...
Hey All,

I want to create an assembly in .Net that I can reference and use in VBA.

I have a sample assembly that I've strongly named and that is loaded in
the
GAC. However, I can not see from within VBA.

Please advise?

Thanks & Regards,

TC

Oct 27 '06 #4

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

Similar topics

3
by: Nick | last post by:
I've just created a simple class library, gave it a strong name using sn.exe, then copied it to c:\winnt\assembly directory. I then created an ASP client that reference that assembly. The client...
2
by: Vera | last post by:
I have two assemblies that each consist of several classes. Each object instantiated from those classes can have one or more child- and/or parentobjects that are also instantiated from those...
4
by: Spike | last post by:
i know its possible to load an assembly and create instances of the types contained however is it possible to do this withough calling the assembly.createinstance method? but using the Activator...
0
by: MikeY | last post by:
Being a newbie with Reference/Resource is there a way of embedding the ..resource file within a folder of my application instead of having it in the main project /executing assembly area. i.e. if I...
0
by: MikeY | last post by:
With Reference/Resource is there a way of embedding the .resource file within a folder of my application instead of having it in the main project /executing assembly area. i.e. if I have a folder...
5
by: serge calderara | last post by:
Dear all, I do not see the difference between Referencing an assembliy for use in my project and Register it on a page ? At the end if I want to use assembly functionnality , I need anyway to...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
2
by: Steve | last post by:
Kind of a strange question... I have a VB.NET 2.0 solution containing a main project (my EXE) and a number of other projects (class DLLs) that are "plug-ins" to the main app. These plugins get...
0
balabaster
by: balabaster | last post by:
Hi all, I'm creating a class factory and a bunch of adapters to allow in house applications to communicate with mobile applications over different cellular networks. I've got my class...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.