>Hello,
>
>I'm trying to open a specific Excel file once I have started Excel (oleApp=Createobject("Excel.Application")).
>
>I attempted to record the macro in Excel which gave me...
>Workbooks.Open FileName:= _
>"C:\foldername\filename.xls"
>
>As I've found working with Excel, it's probably some little part of the macro that isn't correct if copied into FoxPro code. I just haven't hit on what that is on my own.
>
>Any help is greatly appreciated.
Hi Martha,
lcXlsFile = "C:\foldername\filename.xls"
oExcel = CreateObject("Excel.Application")
oWorkbook = oExcel.Workbooks.Open(lcXlsFile)
oExcel.Visible = .T.
oSheet = oWorkbook.ActiveSheet
? oSheet.Cells(3,2).Value
--sb--