Hi
I have this bit of code
Sub find()
rngY = ActiveCell.Value
Sheets("StkFile").Select
Columns("A:F").Select
Selection.find(What:=rngY, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
End Sub
Which works fine if there is a match if not it comes up with a debug message.
How can I get it to work even if there is no match and give the user some kind of message - not found!
Also is there a way I could get it to work on double clicking a cell and finding that value ??
I have this bit of code
Sub find()
rngY = ActiveCell.Value
Sheets("StkFile").Select
Columns("A:F").Select
Selection.find(What:=rngY, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
End Sub
Which works fine if there is a match if not it comes up with a debug message.
How can I get it to work even if there is no match and give the user some kind of message - not found!
Also is there a way I could get it to work on double clicking a cell and finding that value ??