Hi,

Is it possible to declare events in your interfaces? I want to use an interface class to provide a standard interface to my app. Here is an example of what I'm trying to do:

VB Code:
  1. PublicNotCreateable Class MyInterface()
  2.   Public Event InterfaceEvent(parameter as Variant)
  3.  
  4.   Public Sub InterfaceMethod()
  5.     '
  6.   End Sub
  7. End Class
  8.  
  9. Public Class InterfaceImplemented()
  10.   Implements MyInterface
  11.  
  12.   Private Sub MyInterface_InterfaceMethod()
  13.     MsgBox "This is an interface method"
  14.   End Sub
  15.  
  16. End Class
  17.  
  18. Public WithEvents MyObj as MyInterface
  19.  
  20. Private sub Form_Load()
  21.   Set MyObj = New InterfaceImplemented  'The error occurs here because
  22. 'vb says I haven't implemented the event.
  23. 'This is all very good and well, but how do I do that?
  24. End Sub

The class declaration is just to show you the different classes. Thanks