Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Shared Workbook UserForms

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   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Shared Workbook UserForms

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Links not updating in shared workbook JP Long Excel Worksheet Functions 0 April 26th 06 09:52 PM
Shared Workbook Problem Bobby G Excel Discussion (Misc queries) 0 April 5th 06 06:52 AM
Shared Workbook Bryan Excel Discussion (Misc queries) 1 February 23rd 06 09:13 PM
Shared Workbook Protection Mike Excel Discussion (Misc queries) 1 January 24th 06 03:38 PM
Shared workbook Trish Lockhart Excel Discussion (Misc queries) 0 April 12th 05 07:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"