Figure 2   Using Two Interfaces


 Option Explicit
 Implements IMyInterface
 Implements IMyOtherInterface
 
 Private Sub IMyInterface_Method1()
   ' your implementation
 End Sub
 
 Private Sub IMyInterface_Method2()
   ' your implementation
 End Sub
 
 Private Sub IMyOtherInterface_Method3()
   ' your implementation
 End Sub
 
 '*** scripting support added to default interface
 Public Sub Method1()
   Call IMyInterface_Method1  ' forward call
 End Sub
 
 Public Sub Method2()
   Call IMyInterface_Method2 ' forward call
 End Sub
 
 Public Sub Method3()
   Call IMyOtherInterface_Method3 ' forward call
 End Sub

Figure 4   CMyClass


 Option Explicit
 Implements IMyInterface
 Implements IMyOtherInterface
 
 Private Sub IMyInterface_Method1()
   ' your implementation
 End Sub
 
 Private Sub IMyInterface_Method2()
   ' your implementation
 End Sub
 
 Private Sub IMyOtherInterface_Method3()
   ' your implementation
 End Sub

Figure 5   CMyScriptWrapper


 ' wrapper component for CMyClass
 Private ref1 As IMyInterface
 Private ref2 As IMyOtherInterface
 
 Private Sub Class_Initialize()
   Set ref1 = New CMyClass  ' create object and
   Set ref2 = ref1          ' establish connections
 End Sub
 
 Public Sub Method1()
   Call ref1.Method1 ' forward call
 End Sub
 
 Public Sub Method2()
   Call ref1.Method2 ' forward call
 End Sub
 
 Public Sub Method3()
   Call ref2.Method3 ' forward call
 End Sub