>Dear all,
>
>I would like to know the equivalent code to VFP if using OLE the command in Excel for "Find" The following will give an error:
>
>XLApp = createObject('excel.application')
>XLApp.Visible = .t.
>*XLApp.WorkBooks.open('c:\xxx\xxxx.xls')
>
>
>XLSheet = XLApp.ActiveSheet
>
>xlsheet.range("h:h").select
>
>xlsheet.selection.find.text="ABCD"
>
>Please advise.
>
>Thanks.
>
>Ed
Selection is a property of Excel.Application not Sheet.
xlsheet.application.selection.find.text="ABCD"
or:
xlsheet.range("h:h").find.text="ABCD"
Cetin