Hi, I have a piece of code that generates a new document from the current document (using ThisWorkbook.SaveAs sFilename). This can be then propagated through several documents.
i.e.
wkbk001.xlsm
wkbk002.xlsm
... etc.
The problem I am having is that when someone tries to open one of the former documents, it reports that it is locked for editing by 'another' user. It is not specific about which user, but I can usually go to another machine and open it without any problems (even if that was not the machine or user that created it).
I have tried to disable the autosave (ThisWorkbook.EnableAutoRecover = False) thinking that maybe the original source document has a lock file open somewhere or a temp file open, but to no avail.
It also seems to be slightly randomised as to which documents will come up with the error and which will not, and it varies also between the three different machines that I have tried.
All machines are running Office 2010 on Windows 7.
Any help appreciated.
Here is my SaveAs function for reference:
Bookmarks