Loop Crashing Excel VBA
<p>i have been having problems with getting my code to run through its conditional loop and stopping. Here is what I have: </p>

<pre><code>  Do While True
    Dim i As Integer
    i = 2
    If Cells(i, 1).Value &lt;&gt; "" And Not IsError(Cells(i, 2).Value) Then
        Range(Cells(i, 1), Cells(i, 22)).Copy
        Range(Cells(i, 1), Cells(i, 22)).PasteSpecial
        i = i + 1
    Else
        Exit Do
    End If
  Loop
</code></pre>

<p>What I'm trying to do is to get the program to check if one cells isn't empty and if another doesn't have an error in it, if that condition is met, then the program would copy a certain row and re-paste it as just it's values since some of the cells in the row is a formula. For some reason the loop doesn't exit and Excel crashes, am I missing something?</p>