Try this
Dim oSheet As Worksheet
Dim rFindWhat As Range
Dim rFindWhere As Range
Dim NextCell As Range
Dim WhatToFind As Variant
WhatToFind = Application.InputBox("Please enter the Application or Service you want to search for?", "Search", , 500, 80, , , 2)
If WhatToFind <> "" And Not WhatToFind = False Then
'osheet is not declared
For Each oSheet In ActiveWorkbook.Worksheets
With oSheet
Set rFindWhere = oSheet.Range(Cells(1, 1), Cells(Rows.Count, 2).End(xlUp))
Set rFindWhat = rFindWhere.Find(What:=WhatToFind, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not rFindWhat Is Nothing Then
If MsgBox("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & rFindWhat.Address, vbOKCancel) = vbCancel Then Exit Sub
rFindWhat.Activate
On Error Resume Next
While (Not NextCell Is Nothing) And (Not NextCell.Address = rFindWhat.Address)
Set NextCell = Cells.FindNext(After:=ActiveCell)
If Not NextCell.Address = rFindWhat.Address Then
NextCell.Activate
If MsgBox("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & NextCell.Address, vbOKCancel) = vbCancel Then Exit Sub
End If
Wend
End If
End With
Next oSheet
End If
Set NextCell = Nothing
Set rFindWhat = Nothing
Bookmarks