#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
You have to use the Workbook.SaveAs method and specify the AccessMode:=xlShared argument. You can check the MultiUserEditing property at the start - it will be True for a Shared workbook.
I also suggest you make a LOT of backups as your workbooks will go wrong eventually. |
#3
|
|||
|
|||
Thanks a lot!
I guess I will just leave the thing un-shared as I have only known that to cause all sorts of trouble up to now. It isn't really helpful. Anyway, I am trying to reduce the number of manual entries that the colleagues in all dpts have to make there, so I can go without it. Up to now, no one complained ;-) Best regards, Officer_Bierschnitt |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to share cell data between tabs of workbook? | littlekeith | Excel | 1 | 03-23-2015 06:21 AM |
share contactlist | Flip | Outlook | 0 | 04-07-2014 06:39 AM |
Can not share Calendar | debbiewake | Outlook | 0 | 09-19-2012 07:02 AM |
Share Archiwum, | w1ckd | Outlook | 3 | 06-28-2011 01:10 AM |
Share Workbook cannot merge | Ichigo | Excel | 3 | 01-19-2010 03:05 AM |