General information
Category:
COM/DCOM and OLE Automation
Title:
Excel File Already Open, Can't Copy To
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...
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only