Dim mRange As Range
Columns("B:B").Select
i = 0
Set mRange = Range("B:B")
mRange.Find(What:="TRUE", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
For i = 0 To 1
Columns("B:B").Select
Set mRange = Range("B:B")
mRange.Find(What:="TRUE", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
Do While Not mRange Is Nothing
Set mRange = Range("B:B")
mRange.Select
mRange.Find(What:="TRUE", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Rows(ActiveCell.Row).Select
Selection.Delete Shift:=xlUp
Loop
Next i
The above code correctly deletes out the rows where a cell has the word "TRUE" in it, but receives this error when it can no longer find "TRUE". It does not jump out of the loop, but hangs at the final mRange.Find
method. What have I done wrong? Thx.
"Run-time error 91, Object variable or With block variable not set"