Microsoft Office Forums Un-share and re-share a workbook?

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2015, 02:39 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Un-share and re-share a workbook? Windows 7 64bit Un-share and re-share a workbook? Office 2013
Advanced Beginner
Un-share and re-share a workbook?
 
Join Date: Oct 2015
Posts: 79
Officer_Bierschnitt is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 11-06-2015, 03:43 AM
Debaser's Avatar
Debaser Debaser is offline Un-share and re-share a workbook? Windows 7 64bit Un-share and re-share a workbook? Office 2010 32bit
Competent Performer
 
Join Date: Oct 2015
Posts: 166
Debaser is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 11-11-2015, 06:59 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Un-share and re-share a workbook? Windows 7 64bit Un-share and re-share a workbook? Office 2013
Advanced Beginner
Un-share and re-share a workbook?
 
Join Date: Oct 2015
Posts: 79
Officer_Bierschnitt is on a distinguished road
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Un-share and re-share a workbook? 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


All times are GMT -7. The time now is 12:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft