title: How to resolve error 400 in excel-vba
body: <p>I am writing an excel-vba to find and delete entire row if having blanks cell in a particular column. My macro is working fine if there is at least one blank cell but showing error 400 if there is no blank cell. My code is</p>
  
  <pre><code>Sub GPF_Sign()
  Dim i As Integer, n as integer
  Dim LROW As Long
  
      LROW = Sheets("GPF").Range("B200").End(xlUp).Row
  
      n = Range("D9:D" &amp; LROW).SpecialCells(xlCellTypeBlanks).Cells.Count
      If n &gt; 0 Then
          Range("D9:D" &amp; LROW).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
      End If
  End Sub
  </code></pre>