Using Group/Ungroup in protected worksheets

Linus_99

Board Regular
Joined
Aug 28, 2002
Messages
145
Hello,

I'm trying to protect a worksheet so that cells are protected but users can still group & ungroup sub-totals by using the Group/Ungroup symbols that appear at the margins.

When using the Protect command, I can't see a way to allow this to happen.

Does anyone know how this can be done for Excel 2003/2007 ?

Thanks
 
If you put the code into the Workbook_Open event (in the ThisWorkbook module) it will run automatically when you open the workbook.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
For example the code in post 21. Remember that it must be in the ThisWorkbook module.
 
Upvote 0
Did exactly that, and changed the name to the worksheet it needs to be linked too.. and it still wont let me close the grouping "-" "+" when protected! :\

Entered this..


Private Sub Workbook_Open()
With Worksheets("Pickrates")
.Protect Password:="", Userinterfaceonly:=True
.EnableOutlining = True
End With


With Worksheets("Pickrates")
.Protect Password:="", Userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub
 
Last edited:
Upvote 0
Can you put a workbook somewhere (eg Dropbox or OneDrive)? You can remove all the data but I need to see the code and structure as you it actually is now.
 
Upvote 0
That wasn't really the idea - I wanted to see the code you had so I could tell you why it wasn't working.
 
Upvote 0
I entered the code, closed the workbook then reopened it.. then it worked. I then opened the tracker and set a password.. and it went back to not working again!?
 
Upvote 0
Nevermind its working! woo .. thanks :) see a previous comment that said he closed it and it worked.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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