smiler44
03-13-2010, 11:19 AM
The code below searches column B looking for what ever value "contents" is. If it finds it all is ok but if it does not it errors. Run time error 91
If the macro can't find the value of "contents" then I would like it to call another sub routine but I'm at a loss as to how to do this.
Can you help?
thankyou
smiler44
Sub Macro1()
Columns("B:B").Select
Selection.Find(What:=contents, After:=ActiveCell, LookIn:=xlFormulas, Lookat _
:=xlPart, searchorder:=xlByRows, searchdirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
End Sub
If the macro can't find the value of "contents" then I would like it to call another sub routine but I'm at a loss as to how to do this.
Can you help?
thankyou
smiler44
Sub Macro1()
Columns("B:B").Select
Selection.Find(What:=contents, After:=ActiveCell, LookIn:=xlFormulas, Lookat _
:=xlPart, searchorder:=xlByRows, searchdirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
End Sub