View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chris Peacock Chris Peacock is offline
external usenet poster
 
Posts: 3
Default Problem implementing connection point sink

Hi Nick,

Thanks for posting that for me. Guess what? It still does the same
thing even when I use your C# code!

There are a couple of things I had to change to get it to work that
far however.

It wouldn't compile for me with "using
Excel=Microsoft.Office.Interop.Excel;", I had to change this to just
"using Excel;" or it complained that "Namespace '' already contains a
definition for 'Excel'". What version of the Excel library are you
using, and how did you add the reference?

The other thing was that you have the parameter to SetupConnection
defined as 'Excel.ApplicationClass'. How do you get the value to pass
to this? I was using 'Excel.Application' (the interface) and if I
change it to 'Excel.ApplicationClass' I get an invalid cast error when
I call this from my main add-in class, which uses the 'application'
parameter passed to the 'OnConnection' function. How are you calling
SetupConnection, are you building a standard COM add-in?

Thanks very much for your help.

Chris.