Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Colin_Bizfine
 
Posts: n/a
Default Protected worksheet, showing and hiding Grouped detail

I have column data that is grouped. When I apply protection to the worksheet
it is not possible to show hidden columns or hide displayed columns.
I want users to be able to do this so that they can adjust the detail that
is printed for their own purposes but I want the content of the sheet
protected.
Is there any way to do this?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Colin_Bizfine wrote:

I have column data that is grouped. When I apply protection to the worksheet
it is not possible to show hidden columns or hide displayed columns.
I want users to be able to do this so that they can adjust the detail that
is printed for their own purposes but I want the content of the sheet
protected.
Is there any way to do this?


--

Dave Peterson
  #3   Report Post  
Colin_Bizfine
 
Posts: n/a
Default

Thanks Dave, I will give that a try

"Dave Peterson" wrote:

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Colin_Bizfine wrote:

I have column data that is grouped. When I apply protection to the worksheet
it is not possible to show hidden columns or hide displayed columns.
I want users to be able to do this so that they can adjust the detail that
is printed for their own purposes but I want the content of the sheet
protected.
Is there any way to do this?


--

Dave Peterson

  #4   Report Post  
Colin_Bizfine
 
Posts: n/a
Default

Tried it. Dave, you are an absolute genius - works exactly as I wanted.
Many Thanks!

"Colin_Bizfine" wrote:

Thanks Dave, I will give that a try

"Dave Peterson" wrote:

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Colin_Bizfine wrote:

I have column data that is grouped. When I apply protection to the worksheet
it is not possible to show hidden columns or hide displayed columns.
I want users to be able to do this so that they can adjust the detail that
is printed for their own purposes but I want the content of the sheet
protected.
Is there any way to do this?


--

Dave Peterson

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

Glad it worked for you.

Colin_Bizfine wrote:

Tried it. Dave, you are an absolute genius - works exactly as I wanted.
Many Thanks!

"Colin_Bizfine" wrote:

Thanks Dave, I will give that a try

"Dave Peterson" wrote:

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Colin_Bizfine wrote:

I have column data that is grouped. When I apply protection to the worksheet
it is not possible to show hidden columns or hide displayed columns.
I want users to be able to do this so that they can adjust the detail that
is printed for their own purposes but I want the content of the sheet
protected.
Is there any way to do this?

--

Dave Peterson


--

Dave Peterson
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



All times are GMT +1. The time now is 01:41 PM.

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"