ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to enable grouping in a protected sheet (https://www.excelbanter.com/excel-worksheet-functions/5206-how-enable-grouping-protected-sheet.html)

Ankur

How to enable grouping in a protected sheet
 
I am using grouping and ungrouping of cells. I want to protect few cells in
the sheet. So when I protect the sheet, I no more can group or ungroup the
cells. Do we have a solution for this

Frank Kabel

Hi
aFAIK there's no solution for this

"Ankur" wrote:

I am using grouping and ungrouping of cells. I want to protect few cells in
the sheet. So when I protect the sheet, I no more can group or ungroup the
cells. Do we have a solution for this


joltinjoe02


I had the same problem, heres the fix:

1. Click on Tools-Macro-Visual Basic Editor
2. Double Click on "This Workbook"
3. Insert the Following Code:

Private Sub Workbook_Open()
ActiveSheet.EnableOutlining = True
ActiveSheet.Protect contents:=True, userInterfaceOnly:=True
End Sub

4. Click Save.

The Workbook_Open() routine automatically runs when the workbook is
opened. The next time you open the workbook you should be able to use
the grouping functions on your protected worksheet!


--
joltinjoe02
------------------------------------------------------------------------
joltinjoe02's Profile: http://www.excelforum.com/member.php...o&userid=15949
View this thread: http://www.excelforum.com/showthread...hreadid=273169



All times are GMT +1. The time now is 12:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com