Hi
I'm trying to create a macro whereby a whole row can be deleted if there are blank cells in column B
I have the below which works perfect in terms of deleting the rows BUT keeps on running after completing, endlessly going. I have to ESC to stop it. What's wrong?
Thanks in advance
I'm trying to create a macro whereby a whole row can be deleted if there are blank cells in column B
I have the below which works perfect in terms of deleting the rows BUT keeps on running after completing, endlessly going. I have to ESC to stop it. What's wrong?
Thanks in advance
Code:
Sub DeleteRow()
Dim rngFind As Range
Do
Set rngFind = Activesheet.Range("B1:B200").Find(What:="", LookAt:=xlWhole)
If Not rngFind Is Nothing Then rngFind.EntireRow.Delete
Loop Until rngFind Is Nothing
Set rngFind = Nothing
End Sub