Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / December 2006

Tip: Looking for answers? Try searching our database.

Double interface VSTO and VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sylvaingross@i-deale.com - 11 Dec 2006 10:16 GMT
Hi,

I need some help...
I develop a VSTO app for Excel 2003, with VS2003+VSTO, written in C#.
My pb is:
* my business code is written in .NET
* user interface is an excel doc
* my client wants to call my .NET functions from VBA macros (button
clic management,..., misc macros ...).
* A shared object, between VBA and .NET should exist, because action
requested by VBA should be executed by .NET. It smells like a singleton
pattern, but between different platforms...

What should be the best solution, to expose my .NET app to VBA ?
I thought that the best would be to use COM interop: write my component
for COM, and reference it in VBA project)
But the pb is that when I instanciate my class, the created object is
not shared with the instance created in .NET, even if I use statics
I hope that I clearly exposed my pb, and that sonmeone can help me !
Thank you !
Bill Coan - 11 Dec 2006 17:41 GMT
One approach, probably the easiest, is as follows:

url:http://blogs.msdn.com/pstubbs/archive/2004/12/31/344964.aspx

Other ideas here:

url:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=459282&SiteID=1

Bill Coan
billcoan@wordsite.com
> Hi,
>
[quoted text clipped - 16 lines]
> I hope that I clearly exposed my pb, and that sonmeone can help me !
> Thank you !

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.