title: Excel 2010 VBA - error : Object variable or With Block variable not set
body: <p>I have an own class (ClassFoo) with a simple property (pName), and I could not set it, because I always get error ...</p>
  
  <pre><code>Class Modules - ClassFoo
  ---
  Public pName as String
  
  Public Property Let Name(Value as String)
     pName = Value
  End Property
  ----
  Somewhere else in the ModuleX
  ...
  Dim Foo as ClassFoo
  Foo.Name = "foo" &lt;- throws error 
  Foo.pName = "foo" &lt;- throws error 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>With Foo
  .pName = "foo" &lt;- throws error 
  End With 
  </code></pre>
  
  <p>I changed the class 'Instancing' from 'Private' to 'PublicNotCreatable' (back and forth)
  But I still have the same error ...</p>
  
  <p>Thanks for the replies in advance.</p>
  
  <p>Cs</p>