File Sharing Violation

J

Jay

Thanks in advance.

My module(not Excel VBA) genrated automatically every two hours an Excel
File (Performance.xls) to a predefined network folder.
Since somebody leave this file open, 'File Sharing Violation' error happens
and it is not being updated at all.

Q1. Is there any way to overwrite even he file is open.
Q2. If not, at leaset to close error dialog box.

Appreciated
 
M

mike

You could try setting it as a shared workbook, and set the settings to always
overwrite other users changes (In 2007 its on the "review" tab). You could
also change the Windows permissions to allow it to open to "read only" for
all other users and "read/write" for you (assuming others won't need to
modify the file).
 
K

Kevin B

In addition to Mike's excellent suggestions, you could also run some code to
see if the file is open. The URL below is a link to the Microsoft Office
Knowledge Base and has all the necessary instructions and code to check if a
file is open:

http://support.microsoft.com/kb/213383
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top