Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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...
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement