|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Calling .Net DLL functions in Excel 2003Is it possible to call functions wrapped in a DLL created via VS 2003
(Academic) from within an Excel 2003 Module via VBA (Declare Statement in Excel VBA)? I know this works with DLLs wrapped with VB6.0P. I have looked on MSDN, but have no clue where to start searching. -- Grumpy Aero Guy "Grumpy Aero Guy" <f*@beerme.org> schrieb: Yes. Enable the "Register for COM interop" checkbox in the project > Is it possible to call functions wrapped in a DLL created via VS 2003 > (Academic) from within an Excel 2003 Module via VBA properties. Compile the project. Add a COM reference to the interop type library (TLB) that has been created for the .NET DLL. > (Declare Statement in Excel VBA)? No, simply add a reference to the type library (not the DLL file).-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thank you... I'll give it a shot (something else to play with ! )
-- Show quoteHide quoteGrumpy Aero Guy "Grumpy Aero Guy" <f*@beerme.org> wrote in message news:fvFlg.76084$YI5.73181@tornado.ohiordc.rr.com... > Is it possible to call functions wrapped in a DLL created via VS 2003 > (Academic) from within an Excel 2003 Module via VBA (Declare Statement in > Excel VBA)? > > I know this works with DLLs wrapped with VB6.0P. > > I have looked on MSDN, but have no clue where to start searching. > -- > Grumpy Aero Guy > > > > Works GREAT...
I really appreciate your concise and knowledgeable answers. Now, is the type library "independent", or does the DLL need to be there as well, once reference is set ... (?) Enquiring minds want to know :-) Frank B. -- Show quoteHide quoteGrumpy Aero Guy "Grumpy Aero Guy" <f*@beerme.org> wrote in message news:fvFlg.76084$YI5.73181@tornado.ohiordc.rr.com... > Is it possible to call functions wrapped in a DLL created via VS 2003 > (Academic) from within an Excel 2003 Module via VBA (Declare Statement in > Excel VBA)? > > I know this works with DLLs wrapped with VB6.0P. > > I have looked on MSDN, but have no clue where to start searching. > -- > Grumpy Aero Guy > > > > The type library only defines the interface that is contained in the dll
So the answer is you need the Dll ( not necesary is the type library , as it is only handy for developers who can set a reference to it without actually installing the app on the dev system ) P.s. Note that you need to use regasm to register the .Net COM assembly on target systems ( on your dev machine VS.net takes care of that ) regards Michel Posseth Show quoteHide quote "Grumpy Aero Guy" wrote: > Works GREAT... > > I really appreciate your concise and knowledgeable answers. > > Now, is the type library "independent", or does the DLL need to be there as > well, once reference is set ... (?) > > Enquiring minds want to know :-) > > Frank B. > > -- > Grumpy Aero Guy > > > > "Grumpy Aero Guy" <f*@beerme.org> wrote in message > news:fvFlg.76084$YI5.73181@tornado.ohiordc.rr.com... > > Is it possible to call functions wrapped in a DLL created via VS 2003 > > (Academic) from within an Excel 2003 Module via VBA (Declare Statement in > > Excel VBA)? > > > > I know this works with DLLs wrapped with VB6.0P. > > > > I have looked on MSDN, but have no clue where to start searching. > > -- > > Grumpy Aero Guy > > > > > > > > > > >
Mouse/Screen Image Status
Datagrids Counting rows in an SQL table how to launch media player and a selected file from within VB.Net app? Locking a Combo-Box asp.net template for user registration How do I make my computer unstupid? how do i compare two string and get the difference? How to update application settings in vb.net code Easiest way to get the equivalent of vb6 app.path in vs2005 Vb.net |
|||||||||||||||||||||||