Hello,
I have written code to search for a name in a range (a column). When the name is not there, I get an Error 91 which stops my code. I know the value will not always be there and would like to capture the error rather than have the code abort. The On Error statement I have does not do this. Can you help? The code is below.
Thanks
Columns(WhoCol).Select 'search for active name in Who column only
On Error GoTo No_Loc_Yet 'trap for unfound name
Selection.Find(What:=Active_Name, LookAt:=xlWhole, SearchOrder:=xlByRows).Activate
I have written code to search for a name in a range (a column). When the name is not there, I get an Error 91 which stops my code. I know the value will not always be there and would like to capture the error rather than have the code abort. The On Error statement I have does not do this. Can you help? The code is below.
Thanks
Columns(WhoCol).Select 'search for active name in Who column only
On Error GoTo No_Loc_Yet 'trap for unfound name
Selection.Find(What:=Active_Name, LookAt:=xlWhole, SearchOrder:=xlByRows).Activate