Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have put the code below in a workbook to unshare. Here are my
steps. 1. I manually share the workbook from the Worksheet Menubar. 2. I run the code below from a command button. Dim Filename As String Filename = ActiveWorkbook.Name 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'Copy this code into the 'Shared' workbook - PART 1 of 2 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Application.DisplayAlerts = False If ActiveWorkbook.MultiUserEditing Then ActiveWorkbook.UnprotectSharing ActiveWorkbook.ExclusiveAccess End If Application.StatusBar = ("Please wait initialising workbook.") Application.DisplayAlerts = True 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'End of Part 1 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx For Each Sht1 In Workbooks(Filename).Worksheets Sht1.Unprotect Next Sht1 When I run the macro I get an error message Run-time error '1004' Method "UnprotectSharing" of object "_Workbook" failed. I would appreciate any assistance on this problem. Thanks. Matt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't unshare workbook | Excel Worksheet Functions | |||
Unshare and Reshare a workbook | Excel Programming | |||
how to unshare a workbook? | Excel Worksheet Functions | |||
Unshare a Shared Workbook | Excel Discussion (Misc queries) | |||
unshare workbook | Setting up and Configuration of Excel |