lnFileHandle = FOPEN('myfile.txt',12) IF lnFileHandle < 0 * Cannot open file ELSE * File is not in use. =FCLOSE(lnFileHandle) ENDIF>I have an app that generates Excel reports using "COPY TO (lcFile) TYPE XL5" where "lcFile" is a filename generated by the date (ie. "report_20011225.xls"). If someone runs the report, which automatically opens in Excel, then keeps it open and later re-runs it (happens very often) then they get a "LOCK FILE VIOLATION" error and the new report can't open. How can I check to see if a file is open already? I tried using an error handler to change the filename, but keep getting a MISMATCHED PUSH/POP error. There has to be a better way...