Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi All,
I have a Shared Workbook that contains macros. Some of these macros use UserForms. On one of the UserForms there is a button that I want disabled unless the Workbook is not shared as I go in every morning to make a back up and update the Pivot Tables. I have set the button to "Enabled = False" when the UserForm is initialised but do not know how to get the macro to test to see if the Workbook is shared so that if this is false I can enable the button. Can anyone help? Brendan Vassallo |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Take a look at ExclusiveAccess in VBA's help.
You'll see this as an example: If ActiveWorkbook.MultiUserEditing Then ActiveWorkbook.ExclusiveAccess End If So you could test the .multiuserediting property of the workbook to determine the "sharedness" of the workbook. Brendan Vassallo wrote: Hi All, I have a Shared Workbook that contains macros. Some of these macros use UserForms. On one of the UserForms there is a button that I want disabled unless the Workbook is not shared as I go in every morning to make a back up and update the Pivot Tables. I have set the button to "Enabled = False" when the UserForm is initialised but do not know how to get the macro to test to see if the Workbook is shared so that if this is false I can enable the button. Can anyone help? Brendan Vassallo -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Dave
"Dave Peterson" wrote: Take a look at ExclusiveAccess in VBA's help. You'll see this as an example: If ActiveWorkbook.MultiUserEditing Then ActiveWorkbook.ExclusiveAccess End If So you could test the .multiuserediting property of the workbook to determine the "sharedness" of the workbook. Brendan Vassallo wrote: Hi All, I have a Shared Workbook that contains macros. Some of these macros use UserForms. On one of the UserForms there is a button that I want disabled unless the Workbook is not shared as I go in every morning to make a back up and update the Pivot Tables. I have set the button to "Enabled = False" when the UserForm is initialised but do not know how to get the macro to test to see if the Workbook is shared so that if this is false I can enable the button. Can anyone help? Brendan Vassallo -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Links not updating in shared workbook | Excel Worksheet Functions | |||
Shared Workbook Problem | Excel Discussion (Misc queries) | |||
Shared Workbook | Excel Discussion (Misc queries) | |||
Shared Workbook Protection | Excel Discussion (Misc queries) | |||
Shared workbook | Excel Discussion (Misc queries) |