title: VBA Assign reference to object via constructor
body: <p>I have the following VBA code in a class module (Access 2010, Option Explicit):</p>
  
  <pre><code>public pObservers as Collection
  private Sub Class_Initialize()
      Set pObservers = new Collection
  End Sub
  </code></pre>
  
  <p>When I try to construct a new instance of the class, the constructor fails with a compile error: "Variable not defined".</p>
  
  <p>Yes, I know good practice is that pObservers should be a property - I've simplified it to try to isolate the problem.  So how <em>should</em> I initialize an object from a constructor?</p>
  
  <p>(I don't really know VBA at all - you can probably tell.)</p>
  
  <p>Thanks in advance.</p>