Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping and outline

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Grouping and outline

Hi swami

(a re-work of a post by Dave Peterson)

If you protect the worksheet in code you can enable this functionality ...
the code needs to go in the "ThisWorkbook" module as

Private Sub Workbook_Open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub
---
where sheet1 is the name of the worksheet in question and "hi" is your
password.

Hope this helps
Cheers
JulieD


"swami" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping and outline

HI ,
thanks for the reply.
But as i already mentioned , i am generating about 100 workbook and assign
formulas . all my workbooks are automatically created by macros. Now how to
assign the below code to each and every work book. Any idea

thanks


"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.


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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping and outline

HI ,
thanks for the reply.
But as i already mentioned , i am generating about 100 workbook and assign
formulas . all my workbooks are automatically created by macros. Now how to
assign the below code to each and every work book. Any idea

thanks


"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.


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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Grouping and outline

Chip Pearson has instructions for adding procedures through code:

http://www.cpearson.com/excel/vbe.htm

swami wrote:
HI ,
thanks for the reply.
But as i already mentioned , i am generating about 100 workbook and assign
formulas . all my workbooks are automatically created by macros. Now how to
assign the below code to each and every work book. Any idea

thanks


"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.


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





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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Grouping and outline

You have one more suggestion at your post in .misc.

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.


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Grouping and outline

Why not use a template that already has the code in it?

--
Regards,
Tom Ogilvy

"swami" wrote in message
...
HI ,
thanks for the reply.
But as i already mentioned , i am generating about 100 workbook and

assign
formulas . all my workbooks are automatically created by macros. Now how

to
assign the below code to each and every work book. Any idea

thanks


"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.


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




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Grouping and outline

Hi,

What about if there are 10 worksheets in the file, what should I do to
enable this function in 9 of the worksheets?
Thank you very much.

"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.


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


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Grouping and outline

You could loop through the worksheets. For example:

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name < "Summary" Then
With ws
.EnableOutlining = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End If
Next ws


bayhe wrote:
Hi,

What about if there are 10 worksheets in the file, what should I do to
enable this function in 9 of the worksheets?
Thank you very much.

"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.


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





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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outline(grouping) more than 8 levels dk96m Excel Discussion (Misc queries) 1 October 26th 09 06:10 PM
Grouping and outline to the left or above Stonewall Rubberbow Excel Discussion (Misc queries) 0 December 10th 08 11:53 PM
Grouping & Outline havovie Excel Discussion (Misc queries) 2 July 8th 08 04:11 PM
Excel 2007 Crashes when using outline/grouping meldrum_scotland Excel Discussion (Misc queries) 0 March 11th 08 07:29 PM
Grouping and outline Joel Excel Discussion (Misc queries) 2 August 28th 07 01:40 PM


All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"