miless2111s
Active Member
- Joined
- Feb 10, 2016
- Messages
- 279
- Office Version
- 365
- 2016
- Platform
- Windows
I have some code to protect a sheet which prevents the user from un-hiding columns:
however i have also used in other sheets
I suspect the latter to was to allow the user to open and close outlining and interact with pivot tables etc (this was a while ago so I am not sure)
In the sheets protected by the latter code the users are able to un-hide columns which isn't good.
How do I allow them to interact with pivots and grouped / outlined rows and columns but NOT un-hide columns and rows?
Many thanks
Miles
Code:
wsh.protect password:="xxx", AllowFormattingCells:=True, userinterfaceonly:=True
Code:
wsh.Protect Password:="xxx", AllowFormattingCells:=True, userinterfaceonly:=True, DrawingObjects:=True
wsh.EnableOutlining = True
I suspect the latter to was to allow the user to open and close outlining and interact with pivot tables etc (this was a while ago so I am not sure)
In the sheets protected by the latter code the users are able to un-hide columns which isn't good.
How do I allow them to interact with pivots and grouped / outlined rows and columns but NOT un-hide columns and rows?
Many thanks
Miles