Un-share and re-share a workbook?
Hi,
I have to work in a number of workbooks which are shared, allowing multiple users to edit them.
That is problematic as it prohibits some things I have to do in them.
Right now, I'm developing a macro that will run on a number of Excel_files which may or may not be shared.
The macro is in my personal macro_workbook and will not be part of those files, so the only thing I have to make sure of is that the files are
- made exclusive at the outset so that my macro can make all the
necessary edits
- re-shared at the end.
After some trial-and-error, I have somehow contrived to find a code to un-share a workbook. It is
>> ActiveWorkbook.ExclusiveAccess <<
I just see, there is a property >> SharedWorkspace << - but, well, that is a property while the other one seems to be a method.
Can anyone give me a hint on how to re-share a workbook at the end of my program (but only if it was shared to begin with if that can be done)?
Thanks a lot!
Best regards,
DataNibbler
|