ooppps.
sory for that.
my first code was
Sub find_n_del()
Worksheets("Tb_Rnd").Cells.Find(ActiveCell.Value, , , xlWhole, xlByRows, xlNext).Clear 'match entire cell contents
'Worksheets("Tb_Rnd").Cells.Find(ActiveCell.Value, , , xlPart, xlByRows, xlNext).Clear 'partial match
End Sub
thinking that ActiveCell's value always exists in "Tb_Rnd".
but what if there is not a match... so i added error handling. but i forgot to delete the "Clear"!
correct procedure must be like this:
Sub find_n_del()
Dim rng2del As Range
On Error Resume Next
Set rng2del = Worksheets("Tb_Rnd").Cells.Find(ActiveCell.Value, , , xlWhole, xlByRows, xlNext) 'match entire cell contents
'Set rng2del = Worksheets("Tb_Rnd").Cells.Find(ActiveCell.Value, , , xlPart, xlByRows, xlNext) 'partial match
If Not rng2del Is Nothing Then
rng2del.Clear
Else
MsgBox "Searched value not found!", vbOKOnly, "Not Found"
End If
On Error GoTo 0
End Sub