title: Custom Event not firing
body: <p>I am in Excel 2010 and I seem to be getting a strange rather unexpected behaviour working with custom events. </p>
  
  <p><em>I am like 99% sure this approach has worked for me a few years ago (maybe it was in Excel 03/07 - can't remember)</em> <strong>or</strong> <em>maybe I've just messed something up</em>...</p>
  
  <p>Here's a repro:</p>
  
  <p>Add a new class module and name it <code>Factory</code></p>
  
  <pre><code>Public Event AfterInitialize()
  
  Private Sub Class_Initialize()
      RaiseEvent AfterInitialize
  End Sub
  </code></pre>
  
  <p>Add another class module and name is <code>FactoryTest</code></p>
  
  <pre><code>Private WithEvents cFactory As Factory
  
  Private Sub Class_Initialize()
      Set cFactory = New Factory
  End Sub
  
  Private Sub cFactory_AfterInitialize()
      Debug.Print "after inialized..."
  End Sub
  </code></pre>
  
  <p>and a standard <code>Module1</code> and run the below</p>
  
  <pre><code>Sub Main()
  
      Dim fTest As FactoryTest
      Set fTest = New FactoryTest
  
  End Sub
  </code></pre>
  
  <p>At this point I expected to see <code>after initialized..</code> in the Immediate Window but I don't...</p>
  
  <p>Stepping-through the code it seems that the <code>Private Sub cFactory_AfterInitialize()</code> is never reached...</p>
  
  <p>Note: </p>
  
  <p>I can add a public sub: <code>RaiseAfterInitialize()</code> to the <code>Factory</code> class and then call that explicitly in the <code>Initialize()</code> event in the <code>FactoryTest</code> like <code>cFactory.RaiseAfterInitialize()</code> so that could be a possible work around but what I am really trying to understand is why it doesn't work the original way showed above?</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/gg278940(v=office.14).aspx">There isn't much on VBA events on MSDN</a></p>
  
  <p>Can anyone point out what I am doing wrong?</p>