>Not sure what you mean. I am using the following code..
>
>oExcel = CREATEOBJECT("Excel.Application")
>oExcel.Visible = .T.
>oBook = oExcel.Workbooks.FOPEN(xlFile)
>oSheet = oBook.ActiveSheet
>
>and it will allow me to open it and write to it even though it is ReadOnly. I want to prevent this from opening until someone else is done using it.
I didn't know excel had an fopen(), does it really (versions I've do not)?
lnHandle = FOPEN(m.xlFile,12)
llNotInUse = (lnHandle > 0)
if m.llNotInUse
fclose(m.lnHandle)
else
endif
Or open with notification:
oExcel.Workbooks.Open(m.xlFile,,,,,,,,,,.t.)
Cetin