View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Shared Workbook UserForms

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