title: What is the difference between Dim, Global, Public, and Private as Modular Field Access Modifiers?
body: <p>In VB6/VBA, you can declare module-level variables outside of a specific <code>Sub</code> or <code>Function</code> method.  I've used <code>Private</code> and <code>Public</code> before inside modules and understand them like so:</p>
  
  <ul>
  <li><code>Public</code> - visible to all code inside the module and all code outside the module, essentially making it global.</li>
  <li><code>Private</code> - visible only to code inside the module.</li>
  </ul>
  
  <p>I've noticed that you can use <code>Dim</code> and <code>Global</code> as modifiers for modular variables.  Are <code>Dim</code> and <code>Global</code> different from <code>Private</code> and <code>Public</code>, respectively, when used as access modifiers on modular fields? If so, how are they different?</p>