• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

"your changes could not be saved because of a sharing violation"

Laget

New Member
I have Excel 2013 64bit running a macro that goes through a series of files in my local drive, opens them, refreshes the power queries inside, save and close; this process runs daily, and has worked well since the beginning.

Yesterday one of the files could not be saved, with the message "your changes could not be saved because of a sharing violation", then Excel tries to force me to save with another name. I also cannot delete or cut the file, saying the file is "opened in system".

Since yesterday, this behavior has spread to two more files, rendering them useless. I cannot find a rational explanation nor a solution for this, and this process is critical for my company. Does anyone have any idea of how can I solve this issue?
 

Chihiro

Excel Ninja
Few tests you can run.

1. Launch Excel in Safe Mode and see if you can save. If you can, likely culprit is one of add-ins. Disable one by one and identify the add-in that's causing the issue.

2. Occasionally, anti-virus software has been known to cause this. Disable them and test.

3. If Indexing option is turned on for the folder, turn it off and test.

There can be many causes of this issue, and difficult to pinpoint. My suggestion is to contact Microsoft Support and log a ticket with them to resolve the issue.
 

Laget

New Member
I tried some of this options, I think the PowerQuery addin for Excel 2013 may be the problem - I was even able to save one of the files after disabling the Addin manually.

The thing is, I need this addin to refresh the power queries, so I need to disable the addin programmatically inside the macro before saving, and re-enabling it afterwards... any idea how to accomplish that?
 

Chihiro

Excel Ninja
You can't. I suspect your add-in installation has become corrupted.
I'd recommend uninstalling all add-ins. Run Office Repair, then re-install add-in(s).
 
Top