This project has moved. For the latest updates, please go here.

Sheet Protection and cell grouping

Nov 18, 2011 at 1:41 PM

Is it possible to protect a sheet , but allow the user to use row/column grouping? In COM you can set a property EnableOutling before you protect a sheet, indicating that you allow the user to use the group rows/columns marks.

Coordinator
Nov 18, 2011 at 2:33 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Nov 18, 2011 at 10:54 PM

I can't save a file that allows the grouping to work with a protected sheet. To clarify, I can run the following VBA code and the sheet will let me use the outline buttons:

ActiveSheet.EnableOutlining = True
ActiveSheet.Protect contents:=True, userInterfaceOnly:=True
But if I save the file and then open it again, the outline is disabled again.

Please attach two files to the work item I created, one is a protected sheet with an outline (not working) and another file with the same protected worksheet but with a working outline. I want to compare the two.

Thanks,

Coordinator
Nov 21, 2011 at 8:51 PM

Bad news. Apparently there's no way to persist the outline functionality on a protected sheet. http://www.ozgrid.com/Excel/outlining-protected.htm

Nov 22, 2011 at 8:18 AM

In the meanwhile I had found the same issue. My mistake has been caused by the fact that you can create a sheet with that VBA code (and grouping will work), but once you have saved it you cannot use grouping anymore. I guess we have to live with it. Thank you.