>I've used the following code to open up an excel workbook.
>
>oleapp = createobject('excel.application')
>oleapp.visible = .t.
>olewbook = oleapp.workbooks
>olewbook.open('p:\test.xls')
>
>If the workbook is already opened up by someone else prior to running the above code and error is generated when the line "olewbook.open('p:\test.xls')" is executed. Foxpro can't open up the file for read/write because someone else has it opened. How can I test if the excel workbook is opened by someone else before running this code?
Perhaps, you can try with low-level function lnHandle=fopen('yourfile',12) and fclose(lnHandle)
Check Help on these functions.
HTH
If it's not broken, fix it until it is.
My Blog