C# Excel Add-In Question (Intellisense)

  • Thread starter Thread starter Greg McIntire
  • Start date Start date
G

Greg McIntire

Hello all,

I have, what I hope, is a relatively quick question.
I've made a shared add-in in VS.NET 2003 to be used in
Excel XP.

The add-in exposes an optimization process that can be
conducted from Excel VBA (currently have no desire to
make a more formal UI).

I'm up to the debug phase, so i right-clicked and did a
Build on the Add-in, where I was then able to add the add-
in as a programmatic reference in Excel VBA. Worked fine.

I can dimension objects in this add-in and see the
package name and objects just fine. I can even get it to
run.

What I can't do is see any method signatures in Excel's
Object Explorer (type library reader) or via Intellisense.

Anyone have ideas as to why this may be happening?

Thanks in advance,

Greg
 
I've managed to answer my own question but i thought I'd
post what I found here for possible benefit of others.

It seems the early binding required for Intellisense
is 'lost' within the CCW wrapper during assembly.

To fix it you have to create a public interface that
defines the method contract and then implement the class
with an attribute that prevents COM from overwriting the
one you intend.

The answer can be found in this article for VB.NET:

http://support.microsoft.com/?kbid=813809

Additional information on the attribute can be found at:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpguide/html/cpconintroducingclassinterface.asp

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top