ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   My Shared workbook is driving me crazy!!! (https://www.excelbanter.com/excel-discussion-misc-queries/22108-my-shared-workbook-driving-me-crazy.html)

Paul.

My Shared workbook is driving me crazy!!!
 
Hi everyone,

I am experiencing a problem with a shared workbook with a protected sheet
that is driving me crazy.

I have a document with a protected sheet and a Macro that sorts this
protected list when I protect the sheet I allow SORTING and AUTOFILTER.

Once the sheet is protected I go to the VBE and set the protection for
userinterface only in the private workbook module linked to the open
workbook_event:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''
Private Sub Workbook_Open()

Sheets("Critical Path").Protect Password:="",UserInterfaceOnly:=True

End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''
Then I close the workbook and reopen it to enable "UserInterfaceOnly"

Then I share the workbook and run My Macro which sorts the protected sheet
with no problems

Then I save and close the workbook

Then when I reopen it and cannot run the Macro anymore. Actually the problem
comes from the Above code bcse just after opening the workbook I receive an
error message saying:

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''
'Run-time Error 1004':

Application-defined or object-defined error

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''

Does somebody knows how to solve the problem ?

Woul really much appreciate any help on this

Regards,

Paul


Dave Peterson

Search Excel's help for: "Features that are unavailable in shared workbooks".

You'll find that worksheet protection can't be changed.

I think you'll have to either compromise (take off protection or take off
sharing--or change your philosphy).



Paul. wrote:

Hi everyone,

I am experiencing a problem with a shared workbook with a protected sheet
that is driving me crazy.

I have a document with a protected sheet and a Macro that sorts this
protected list when I protect the sheet I allow SORTING and AUTOFILTER.

Once the sheet is protected I go to the VBE and set the protection for
userinterface only in the private workbook module linked to the open
workbook_event:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''
Private Sub Workbook_Open()

Sheets("Critical Path").Protect Password:="",UserInterfaceOnly:=True

End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''
Then I close the workbook and reopen it to enable "UserInterfaceOnly"

Then I share the workbook and run My Macro which sorts the protected sheet
with no problems

Then I save and close the workbook

Then when I reopen it and cannot run the Macro anymore. Actually the problem
comes from the Above code bcse just after opening the workbook I receive an
error message saying:

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''
'Run-time Error 1004':

Application-defined or object-defined error

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''

Does somebody knows how to solve the problem ?

Woul really much appreciate any help on this

Regards,

Paul


--

Dave Peterson


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com