title: Implementing Interface in Excel VBA from C# Library
body: <p>I am completely new to VBA. What I am trying to do is to use a C# DLL that is COM-enabled in order to add some functionality to Excel.</p>
  
  <p>In my DLL I have an event mechanism that is dependent on an Interfaces to implement the event functionality. One of the Interfaces looks like this:</p>
  
  <pre><code>public interface IActivateGadgetResponseActionListener
  {
      String GadgetActivated();
      String GadgetActivationFailed(String response);
  }
  </code></pre>
  
  <p>I am trying to implement this as a class Module in Excel. The code is the following:</p>
  
  <pre><code>Implements IActivateGadgetResponseActionListener
  
  Public Function IActivateGadgetResponseActionListener_GadgetActivated() As String
       MsgBox ("hello")
       IActivateGadgetResponseActionListener_GadgetActivated = ""
  End Function
  
  Public Function IActivateGadgetResponseActionListener_GadgetActivationFailed(response As String) As String
       MsgBox (response)
       IActivateGadgetResponseActionListener_GadgetActivationFailed = response
  End Function
  </code></pre>
  
  <p>When I try to compile the module, I get </p>
  
  <blockquote>
    <p>Compile Error: procedure declaration does not match description of
    event or procedure having the same name</p>
  </blockquote>
  
  <p>The interface is OK I think because If I omit one of the methods I get the message: </p>
  
  <blockquote>
    <p>Compile error:
    Object module needs to implement 'GadgetActivationFailed' for
    interface 'ClsInterface' OK/Help</p>
  </blockquote>
  
  <p>Also I can create objects with the classes of the DLL.</p>
  
  <p>Any help would be appreciated. Thanks in advance.</p>