title: Integer Vs Long Confusion
body: <p>I have seen many believe in the following</p>
  
  <p><strong>VBA converts all integer values to type Long</strong></p>
  
  <p>In fact, even the <a href="http://msdn.microsoft.com/en-us/library/office/aa164506%28v=office.10%29.aspx" rel="nofollow noreferrer"><em>MSDN article</em></a> says </p>
  
  <p><strong>“In recent versions, however, VBA converts all integer values to type Long, even if they're declared as type Integer.”</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Ze5g1.jpg" alt="enter image description here"></p>
  
  <p>How is this possible? Consider this simple example.</p>
  
  <pre><code>Sub Sample()
      Dim I As Integer
      I = 123456789
  End Sub
  </code></pre>
  
  <p>If <code>VBA</code> converts all <code>Integer</code> values to type <code>Long</code> <strong>even if they're declared as type Integer</strong>, then the above should never give you the <code>Overflow</code> error!</p>
  
  <p>What am I missing here? Or should I take it that the statement is incorrect and pay serious heed to that the link says in the beginning</p>