"On Error" help required
Dear Friends,
In the code given below if there is no error then also the msg box is
displayed.
Any help please.
Sub Macro1()
Dim Thyag
On Error GoTo Thyagaraj_Not_Found
Cells.Find(What:="Thyagaraj", After:=ActiveCell,
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
Thyagaraj_Not_Found:
'Selection.Font.Bold = True
Thyag = MsgBox("Thyagaraj not found")
End With
End Sub
Thanks in Advance
Thyagaraj
|