title: Implementing my own interface in VBA - Error: Object module needs to implement 'x' for interface 'y'
body: <p>How do I implement my class <code>ClsInterface</code>, which has this code:</p>
  
  <pre><code>Public Function add(x As Integer, y As Integer) As Integer
  End Function
  </code></pre>
  
  <p>in my class <code>Class2</code>, which has this code:</p>
  
  <pre><code>Implements ClsInterface
  
  Public Function add(x As Integer, y As Integer) As Integer
  add = x + y
  End Function
  </code></pre>
  
  <p>My test code is</p>
  
  <pre><code>Public Sub test()
  Dim obj As New Class2
  MsgBox obj.add(5, 2)
  End Sub
  </code></pre>
  
  <p>This always comes up with the following error:</p>
  
  <blockquote>
    <p>Microsoft Visual Basic<br>
    Compile error:</p>
    
    <p>Object module needs to implement 'add' for interface 'ClsInterface'<br>
    OK/Help     </p>
  </blockquote>
  
  <p>but there is no help on Microsoft help (when I press on Help button).</p>
  
  <p>Any Ideas?</p>