Others can't use groupings in my protected sheet

Rookie14

New Member
Joined
Dec 18, 2014
Messages
2
Hi - I am using Office 2013 and have a protected sheet where I would like users to still be able to open/close groupings.

I have used the code:
Private Sub Worksheet_Open()
With Worksheet ("Europe")
.Unprotect Password:="PW12"
.Protect Password:="PW12", Userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

This works for me, but not for my colleagues. I am new to VBA and not sure why it doesn't work. I have about 11 other identical tabs I need to make this work on.

Thanks in advance.
icon9.png
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
The routine should be called Workbook_Open and not Worksheet_Open and it must be in the ThisWorkbook module. Your colleagues must also of course have macros enabled.
 
Upvote 0
The routine should be called Workbook_Open and not Worksheet_Open and it must be in the ThisWorkbook module. Your colleagues must also of course have macros enabled.

Just tried this - it works now thanks!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,627
Messages
6,120,610
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top