ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i enable "Group" & "Ungroup" in a protected sheet (https://www.excelbanter.com/excel-discussion-misc-queries/91741-re-how-do-i-enable-group-ungroup-protected-sheet.html)

ruddojo

How do i enable "Group" & "Ungroup" in a protected sheet
 
THANK YOU! Its a great help

"Debra Dalgleish" wrote:

If you protect the worksheet programmatically, you can enable outlining,
and you will be able to use the groups that you have created.

The following code goes in the ThisWorkbook module:

Private Sub Workbook_Open()
With Worksheets("Sheet1")
.EnableOutlining = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub

To paste the code into the ThisWorkbook module:

Right-click on the Excel icon, to the left of the File menu
Choose View Code
Paste the code where the cursor is flashing.


Fadi Haddad wrote:
1 -I have grouped data in my excel sheet by using the Group rows function.
2- When i protect the sheet, the goup and Ungroup button (the + sign at the
left of the sheet), won't work.

Question:
Is there a way to proctect the sheet and keep the Group and ungroup (+
sign)function normally.

Thank you



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html




All times are GMT +1. The time now is 09:33 PM.

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