I call the below macro from another macro. It works sometimes, but not every time. I can't figure out why it isn't working, because the text the macro searches for is there, but for some reason I get an error somtimes when it runs. I am getting run time error '424' object required. Any help would be greatly appreciated.
Code:
Sub DeleteRowsTOTALONLY()
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("A1", ActiveSheet.Range("I65536").End(xlUp))
Do
Set c = SrchRng.Find("Total Only", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub