Limit shared excel file to one user at a time

Copper Contributor

Hi all, 

 

This applies to an XLSM document on a sharepoint. 

 

I'm having a persistent issue with a specific shared excel file that seems to corupt on a weekly basis. It comes up "errors were detected while saving". It attempts repair but always fails and won't allow me to save it, even a copy. 

 

I restore to a previous version and it works fine again for an unknown amount of time. A couple of months ago i completely rebuilt the spreadsheet from scratch, including the VBA code to make sure there wasn't something within it causing the issue. 

 

The only theory i have so far after the most recent event (today) is that it's happening when more than one user is editing the spreadsheet at the same time, possibly caused by the use of formula Info(Directory) to extract the username of the person using it. This replaced a UDF created which i suspected could have been causing the issue. Presumably excel is trying to find the username of 2 seperate users but can only display 1 result in the cell, causing excel a breakdown. 

 

So, two questions:

 

  • Is the above theory a possibility or complete nonsense?
  • To test if this is the cause, is there anyway to prevent this document from allowing multiple users? Similar to when two users try to access the same file on a local drive/Nas drive etc where it says the file is locked for editing?

 

Appreciate there are forums online about the "Errors detected" issue but i've tried every method i can find online and nothing seems to fix it. 

 

Thanks in advance

 

0 Replies