G
Guest
Hi,
Using Code to find a value, and if found, then delete the line.
Simple right?
Cells.Find(what:="2000103", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If ActiveCell.Value = 2000103 Then
Selection.EntireRow.Delete
End If
But problem is, when the value 2000103 is not present, I get Run Time Error
91.
Any ideas on debugging?
Using Code to find a value, and if found, then delete the line.
Simple right?
Cells.Find(what:="2000103", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If ActiveCell.Value = 2000103 Then
Selection.EntireRow.Delete
End If
But problem is, when the value 2000103 is not present, I get Run Time Error
91.
Any ideas on debugging?