title: VBA-Excel Overflow Error due to Long data type
body: <p>This may seem too easy, but I am so desperate. </p>
  
  <p>What I need to do is get the <strong>last value</strong> of the column "D" which has a </p>
  
  <p><strong>big amount of number</strong>, ex. 987654321, the code is fine if the value is only two-digit. I just can't identify the problem. </p>
  
  <pre><code>Dim lastRow As Long
  lastRow = Cells(Rows.Count, "D").End(xlUp).Value
  Sheets("Sheet1").TxtBox1.Value = lastRow
  </code></pre>