-
Sharing An Excel Workbook
This question may already have been covered in another thread and I am sorry for bugging anyone but I have searched and I can't find it.
All I am after is some code to turn Share Workbook on and off. I have tried recording it but once you turn sharing on the recorder ends and it does not save any code in the Project.
I need it for a project I am working on and I am tryiny to automate a few things.
Thanks to anyone who can help
-
Re:Sharing An Excel Workbook
Hi Ekka,
you might want to try using :
ActiveWorkbook.MultiUserEditing
ActiveWorkbook.ExclusiveAccess
I have not tried this.
But I guess you cannot have a macro in a shared workbook. So you might not be able to implement both on the same workbook.
Thanks.
-
Here is how i did it once
[VBA]
'unshare
Application.DisplayAlerts = False
ThisWorkbook.ExclusiveAccess
Application.DisplayAlerts = True
'Do stuff here
're-share
Application.DisplayAlerts = False
ThisWorkbook.SaveAs , , , , , , xlShared
Application.DisplayAlerts = True
[/VBA]
hope this helps
-
thanks for that... looks like exactly what i was after
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules