S
SJ
I am trying to find text in my file then delete the entire row then find the next occurance of the same text, but my code is getting stuck on the findnext line. This is my code. Can you help me
Sub testcell3(
Range("A6").Selec
With ActiveSheet.Range("a6:I1000"
Set P = .Find(what:="PAYMENT RECEIVED THANK YOU", after:=ActiveCell, LookIn
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
xlNext, MatchCase:=False
If Not P Is Nothing The
FirstAddress = P.Addres
D
P.EntireRow.Delete Set P = .FindNext(P
Loop While Not P Is Nothing And P.Address <> FirstAddres
End I
End Wit
End su
Sub testcell3(
Range("A6").Selec
With ActiveSheet.Range("a6:I1000"
Set P = .Find(what:="PAYMENT RECEIVED THANK YOU", after:=ActiveCell, LookIn
:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
xlNext, MatchCase:=False
If Not P Is Nothing The
FirstAddress = P.Addres
D
P.EntireRow.Delete Set P = .FindNext(P
Loop While Not P Is Nothing And P.Address <> FirstAddres
End I
End Wit
End su