title: How to end a do while loop in VBA
body: <p>I would like to know what is wrong with my coding as I am unable to end my do while loop in Microsoft Excel VBA. I wish to end this do while loop if the next line is blank.</p>
  
  <pre><code>Do While Cells(RowName, 1) &lt;&gt; ""
      Name = Cells(RowName, ColumnName)
      MsgBox Name
      RowName = RowName + 1
  Loop
  </code></pre>
  
  <p>Please enlighten me as I am still a beginner. The MsgBox kept popping out and does not end even if it is blank.</p>