View Single Post
  #4   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
Matthew Wieder[_3_] Matthew Wieder[_3_] is offline
external usenet poster
 
Posts: 30
Default Hiding Methods in Automation Add-In

Solved it - Based on web examples, I had been implementing my class as:

public class myClass : Object, MyInterface, Extensibility.IDTExtensibility2

which makes the primary interface the object type and that was causing
the problems. Changed to:
public class myClass : MyInterface, Extensibility.IDTExtensibility2

and only the desired methods are showing in Excel now.

thanks.

Matthew Wieder wrote:

The interface is set to dual - the functions still do not show up in the
Insert Function dialog in Excel. Does anyone have this working in .NET
2.0?

Dmytro Lapshyn [MVP] wrote:

Hi Matthew,

Check that the public interface is marked as
ComInterfaceType.InterfaceIsDual or at least
ComInterfaceType.InterfaceIsDispatch (with the [InterfaceType]
attribute).