View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default Grouping and outline

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.


swami wrote:
Hi,
I need to operate the outline symbols ( +OR - , when the data grouping is
done) in a protected mode. At present Excel does not allows it . Any idea. My
excel sheet is being created by a macro and assigns all the formulas,
datagrouping . When i run from macro and check it is working. Once i save the
file and reopen it i am getting problem.



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