>>Jeana,
>>Go to macro editor in Excel, Mark replace and press F1 the help for Replace will appear, check how the parameters are positioned in that function and position it the same way in VFP. Do not use named parameters, VFP could not understand them.
>>
>>** Here what Excel Help said about replace
>>expression.Replace(What, Replacement, LookAt, SearchOrder, MatchCase, MatchByte, SearchFormat, ReplaceFormat)
>>** so you must do something like:
>>
>>#define xlByRows 1
>>#define xlPart 2
>>
>>oExcel.Cells.Replace([$null], [0], xlPart, xlByRows, .f., , .f., .f.)
>>
>>Something like this, but not tested
>
>Why these constants are not in the Excel.h I created using Object Browser?
I don't know, I get them by simple using MsgBox(xlByRows) in Excel Macro Editor :o)
I'am just working for search and fromat row when found. When I finish, I'll let you know. After that I'll try Cetin's code. I am sure it is working somehow :o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.