Claire Jackson
Board Regular
- Joined
- Jun 30, 2020
- Messages
- 74
- Office Version
- 2016
- Platform
- Windows
Hi all, I'm trying to search for a word in excel but if the word isn't found I'm getting a debug so I've tried the following but it isn't working. What am I doing wrong?
Sub FindMe()
On Error GoTo ErrorHandler
Cells.Find(What:=InputBox("Please enter your search criteria", "Search"), _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ErrorHandler:
MsgBox "Job name not found"
End Sub
Sub FindMe()
On Error GoTo ErrorHandler
Cells.Find(What:=InputBox("Please enter your search criteria", "Search"), _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ErrorHandler:
MsgBox "Job name not found"
End Sub