View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.dotnet.framework.interop,microsoft.public.vb.com
Nick Dreyer Nick Dreyer is offline
external usenet poster
 
Posts: 10
Default IDTExten2ibility2 OnConnection method: Can't get it to start

Oh no! Is there no work-around to get an existing instance of Excel 97 to be
accessed from a COM Add-In that is launched from that Excel Instance?

|\|.

On Wed, 20 Jul 2005 04:51:05 -0400, "Rob Bovey" wroth:

Hi Nick,

The problem is your Excel version. Excel 2000 VBA was the first version
of Excel VBA to support the IDTExtensibility2 interface, so you won't be
able to get this working in Excel 97.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Nick Dreyer" wrote in message
...
I am new to VB.NET coding for excel, and so am probably missing
something real elementary he

I can get an Excel 97 VBA module to successfully include a reference
to a VB.NET project that contains the Connect class with the necessary
Guid and ProgId attributes and the five IDTExtensibility2 interface
methods, including OnConnection.

From the VBA module with the reference I need to fire-up code in the
project
containing the Connect class and then have it accesses the instance of
excel
with the calling VBA module. What piece of code am I missing to start up
the
OnConnection method. The docs I read aren't too clear to me about how to
do
this, making it sound like just the creation of the reference to the
VB.NET
project containing the IDTExtensibility2 interface might set off
OnConnection.
However so far I have yet to get a MsgBox to display from OnConnection.

I can get code in other classes contained in the same VB.NET project with
the
IDTExtensibility2 interface to run from VBA, but nothing in OnConnection
and thus am unable to have the VB.NET project recognize my Excel 97
Workbook
as desired.

Thanks so much in advance for your insights


|\|.