I have an Excel shared workbook stored on a legacy SharePoint 2010 document library, which needs to be opened for editing by multiple users via a VBA tool. To pre-empt the question: I am not sure whether the library enforces CheckOut before editing, but I am not the site owner and do not even have permissions to see this setting.
I have used the .CanCheckOut property to see whether another user already has the document checked out (by my tool, which always Checks Out before edit, even if the library does not enforce it), with the code aborting with a message to try again later, if necessary. There is a scenario though, where a user might go into the shared file and manually edit, then check back in but not close the file immediately. This means that the .CanCheckOut property is TRUE (the file is no longer checked out) but a 'File In Use' dialogue is triggered at runtime by another user trying to use my tool, because the shared file is still technically open in edit mode (by someone else), despite not being Checked Out.
Is there any way to check for this scenario i.e. where the shared file is Checked In but is open as writeable by another user? I would rather this avoid any user interaction, but even if we cannot avoid the 'File In Use' dialogue, I need a way to detect this and exit gracefully.
This post was woefully abandoned with the same issue: Check if workbook in SharePoint 365 is locked for editing