Hi Adrian,
Your IsWorkBookOpen() function looks fine to me. You seem to be talking about regular Excel files, and NOT shared files. When a User opens a regular Excel file, that user has exclusive access to the file. In order for another user to open the file, the first user has to close the file.
Typical wait code (untested) is:
The wait can be a long time, if the other user continues to have the file open. Even with the above code and a cooperative other user the above code does not guarantee success.
To guarantee success you need the data to be in File C which is open only a short amount of time to access the data. I User A and B both can update File C, the situation can be a nightmare, with both users having bad data.
I hope this helps.
Lewis
Bookmarks