Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I used the code you posted but i get a Run-time error 9 - subscript out of
range error. how do i fix this? Also, my groups are set up in sheet 6 of my workbook, does that change anything? "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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You have to change Sheet1 to the name of the sheet you're using:
With Worksheets("Sheet1") Remember to change the password to the actual password, too. DBLA137 wrote: I used the code you posted but i get a Run-time error 9 - subscript out of range error. how do i fix this? Also, my groups are set up in sheet 6 of my workbook, does that change anything? "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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ungroup "+" on a protected sheet | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |