ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Detect If Excel WB Is Shared? (https://www.excelbanter.com/excel-programming/306696-re-detect-if-excel-wb-shared.html)

Jake Marx[_3_]

Detect If Excel WB Is Shared?
 
Hi MDW,

MDW wrote:
However, my code seems to fail if the workbook is shared for multiple
users. I've been looking around the help and I can't find any way to
detect this. Does anyone know a way to a) detect if a workbook is
shared and b) remove the sharing if needed?


Sebastien is correct - you can use the MultiUserEditing property to see if a
workbook is shared. If you want to remove sharing, you can use the
ExclusiveAccess method:

ActiveWorkbook.ExclusiveAccess

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]



All times are GMT +1. The time now is 06:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com