Thank you,
I have change the code as
Fc = oExcel.Worksheets("Sheet2").Columns("A").Find("100")
After searching i have do this.
IF FC = .NULL.
.....
ENDIF
Fc return .null. but the if endif statement does not work.
Why
thanks
>
xSearchFor = "My Text"
>oFoundRange = oRange.Find(xSearchFor)
>
>Find returns the range object that represents the first cell where the information is found. It returns nothing if no match is found. So oFoundRange will have the first match (if there is one) or will be null (if not).
>
> - della
>
>>>>How to use the find function from excell in vfp.
>>>>I want to find an expression from A1 to Ax.
>>>
>>>You'll want to set a Range object to A1 to Ax, as in:
>>>
oRange = oExcel.ActiveSheet.Range("A1:A25")
>>>Then you'll use the Find method:
>>>
xSearchFor = "My Text"
>>>oRange.Find(xSearchFor)
>>>See the Help file for more parameters that help you fine-tune Find (can search the forumlas, values, or comments; search forward or backward; match case; etc.)
>>>
>>>HTH,
>>>
>>> - della
>>Thanks.
>>Its works fine.
>>Bu i have now another problem.
>>Do you know, how can i know the result from the find method.
>>Thanks.