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.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,389
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
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.
 

Rookie14

New Member
Joined
Dec 18, 2014
Messages
2
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:

Forum statistics

Threads
1,082,601
Messages
5,366,571
Members
400,902
Latest member
fathima

Some videos you may like

This Week's Hot Topics

Top