Reputation: 91
I have a workbook which will be shared among multiple users. A macro will be run to enter data from userform in the Excel sheet.
The sheet needs to be protected so users can't edit it.
I had ws.Unprotect
My macro code
ws.Protect UserInterfaceOnly:=True
When the workbook is shared it shows the following error:
runtime error 1004 method ' protect of object '_worksheet' failed
Upvotes: 1
Views: 746
Reputation: 1132
Shared Workbooks/Worksheets have limitations... check here.. https://support.office.com/en-us/article/Use-a-shared-workbook-to-collaborate-49b833c0-873b-48d8-8bf2-c1c59a628534
Upvotes: 2