Within an Excel spreadsheet I have a form whose code uses the worksheet SEARCH function. If the search string does not exist I get an error message.
For example:
N = Application.WorksheetFunction.Search("R", "SAMPLE")
This gives an error "Unable to get the serach property of the worksheet function class".
But it works as:
N = Application.WorksheetFunction.Search("S", "SAMPLE")
Is there a way to surpass the error message? I tried trhe ISERR function but it did not work.
Any help much appreciated
Thanks
For example:
N = Application.WorksheetFunction.Search("R", "SAMPLE")
This gives an error "Unable to get the serach property of the worksheet function class".
But it works as:
N = Application.WorksheetFunction.Search("S", "SAMPLE")
Is there a way to surpass the error message? I tried trhe ISERR function but it did not work.
Any help much appreciated
Thanks