J
John Pierce
I have this simple program that captures a string and then jumps
to another sheet to look for that string. It works most of the but
causes an annoying error when "findThis" is not on the target sheet.
I have tried various "On Error GoTo . . ." with no success.
Sub FindThis()
'
Dim FindThis As String
FindThis = ActiveCell.Text
Sheets("Box Log").Select
Cells.Find(What:=FindThis, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
'
End Sub
to another sheet to look for that string. It works most of the but
causes an annoying error when "findThis" is not on the target sheet.
I have tried various "On Error GoTo . . ." with no success.
Sub FindThis()
'
Dim FindThis As String
FindThis = ActiveCell.Text
Sheets("Box Log").Select
Cells.Find(What:=FindThis, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
'
End Sub