tidalwavedc9
New Member
- Joined
- Sep 2, 2014
- Messages
- 2
Hello,
Help with this would be much appreciated. I wrote a program that seeks out a specific string and modifies the format of it's cell once it is found. Sometimes the string will exist on the sheet and sometimes it won't. I need the program to keep running and do its job if the string isn't found...instead it keeps crashing. I though the code below would handle the error:
Columns("B:B").Select
Selection.Find(What:="String", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
If Err.Number = 91 Then
End
Else
"Block of code that modifies cell"
End If
What can I do to tell it to ignore the error and move on?
Thanks!
Help with this would be much appreciated. I wrote a program that seeks out a specific string and modifies the format of it's cell once it is found. Sometimes the string will exist on the sheet and sometimes it won't. I need the program to keep running and do its job if the string isn't found...instead it keeps crashing. I though the code below would handle the error:
Columns("B:B").Select
Selection.Find(What:="String", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
If Err.Number = 91 Then
End
Else
"Block of code that modifies cell"
End If
What can I do to tell it to ignore the error and move on?
Thanks!