Hello Friends
Could anyone please look at this part of the code that I am writing and let me know what am I doing wrong.
The code is supposed to copy prefix from the active cell and store it to the variable 'strPrefix'. The active cell values are in the format of 'xxx-yyyy' (of variable length ofcourse) and the code is supposed to look for dash "-" and get the string portion before the dash and store it to the variable.
So in my example the variable should get 'xxx' added to it.
But when I run my code I am getting runtime error (debugging highlights this row) that "Unable to get the Find property of the WorksheetFunction class"
Thanks for your help
Rajesh
Could anyone please look at this part of the code that I am writing and let me know what am I doing wrong.
The code is supposed to copy prefix from the active cell and store it to the variable 'strPrefix'. The active cell values are in the format of 'xxx-yyyy' (of variable length ofcourse) and the code is supposed to look for dash "-" and get the string portion before the dash and store it to the variable.
So in my example the variable should get 'xxx' added to it.
Code:
strPrefix = Left(ActiveCell.Value, WorksheetFunction.Find("-", ActiveCell.Value, 1) - 1)
But when I run my code I am getting runtime error (debugging highlights this row) that "Unable to get the Find property of the WorksheetFunction class"
Thanks for your help
Rajesh