- Joined
- Nov 10, 2011
- Messages
- 5
- Reaction score
- 0
I have the following code written in vba
VBA
Range("C2:U2").Select
Selection.Find(What:="12x", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
/VBA
it works, but when there is no 12x in this range, i need it to forget about the statement and run the next bit of code, instead of bringing up a runtime error 91.
Can somebody please suggest some VBA code, as I do not have a clue...... Cheers, much appreciated
VBA
Range("C2:U2").Select
Selection.Find(What:="12x", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
/VBA
it works, but when there is no 12x in this range, i need it to forget about the statement and run the next bit of code, instead of bringing up a runtime error 91.
Can somebody please suggest some VBA code, as I do not have a clue...... Cheers, much appreciated