
04-24-2012, 01:55 AM
|
|
Junior Contributor
|
|
Join Date: Jun 2010
Posts: 270
|
|
Shared Workbooks
|
Hi
I have a shared workbook, and I would like to know how to tell in code whether it is currently Shared or Exclusive (since certain things like deleting sheets can't be done while the workbook is shared)
I will use this to enable a button when the workbook is exclusive, and disable it when it is shared
I have tried the MultiUserEditing Property but this doesn't seem to work properly, the button is on a userform and is disabled by default, and code in Userform.Initialize will enable it when the workbook is not shared, but when I go into it in the shared workbook, the button is enabled as well...
The code I used is
Code:
If ActiveWorkbook.MultiUserEditing = False Then CommandButton1.Enabled=True
Thanks
|
|