title: What is the difference between Dim and Public?
body: <p>A question about scope was raised today and it got me thinking.</p>
  
  <p>I've always understood VBScript scope and how to declare Globally and Locally. It occurred to me though that I never use <code>Public</code> variables but tend to use <code>Dim</code> instead when declaring Globally.</p>
  
  <p>As far as I understood it <code>Dim</code> is the same as <code>Public</code>, but if that's the case why have both of them? Is there a difference between the two and is it good practice to use one over the other?</p>
  
  <hr>
  
  <blockquote>
    <p><strong>Update:</strong></p>
    
    <p>This question is aimed purely at VBScript, not VBA and especially in the context of Classic ASP.</p>
    
    <ul>
    <li><a href="http://msdn.microsoft.com/en-us/library/ms970436.aspx" rel="noreferrer">Key Differences Between Visual Basic for Applications and VBScript</a></li>
    </ul>
  </blockquote>