title: error on assigning an event to multiple objects with excel vba
body: <p>I followed all the advice I found here to automatically change the "change" function of comboboxes.
  All works fine, the code does not produce any error, until I want to change the combobox value on the excel sheet : the macro is not launched.</p>
  
  <p>My code is :</p>
  
  <p>In the class file (class : COptions)</p>
  
  <pre><code>Option Explicit
  
      Public WithEvents lOptions As MSForms.ComboBox
  
      Private Sub lOptions_Change()
      MsgBox "hello "
      End Sub
  </code></pre>
  
  <p>In the module file</p>
  
  <pre><code>Sub macrotest()
  
  Dim j As String
  Dim tObject
  Set tObject = Sheets("test").OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
                  Link:=False, _
                  DisplayAsIcon:=False, _
                  Left:=50, Top:=80, _
                  Width:=100, _
                  Height:=15)
              tObject.Name = "Combobox32"
              tObject.Object.Font.Size = 8
              tObject.Object.BackColor = vbWhite
              tObject.Object.AddItem "blub1"
              tObject.Object.AddItem "blub2"
              'MsgBox "tObject " &amp; tObject.Name
  
  Dim Obj As OLEObject
  Dim Cl As COptions
      Set Cl = Nothing
      Set Collect = New Collection '(previously declared as global variable)
  
      For Each Obj In Sheets("test").OLEObjects
          If TypeOf Obj.Object Is MSForms.ComboBox Then
              MsgBox Obj.Name 'check if we enter in the loop : always successfull
              Set Cl = New COptions
              Set Cl.lOptions = Obj.Object
              Collect.Add Cl
                      End If
      Next Obj
      MsgBox "Collect  " &amp; Collect.Count ' which result is 1
  
  End Sub
  </code></pre>
  
  <p>So everything works fine, but back on the Excel worksheet, when I change the combobox value, nothing happens.</p>
  
  <p>By the way, I don't really understand the way this code works.</p>
  
  <p>The new object of the defined class (here : Cl) is created and modified. But the combobox, which is the target of the change, where is it modified? Why is it that by changing the new object Cl, it is the target object ComboBox that it is supposed to change ?</p>
  
  <p>I have no idea of what is happening as I did not find this error on the web.</p>
  
  <p>What should I do to fix this problem?</p>