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

hi everyone,

I have a worksheet where I have grouped certain rows (using Data...Group and
Outline...Group) so I have some + and - signs down my left hand margin.

But when I protect the sheet I can't upgroup the rows!!! And there doesn't
seem to be an option for it under Tools..Protection...Protect Sheet.

Any ideas???


TIA
big t

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


Unprotect those rows. (Unprotect the sheet, select the rows, go t
format cells - Protection, and uncheck the 'locked' box.

--
TommySzalapsk
-----------------------------------------------------------------------
TommySzalapski's Profile: http://www.excelforum.com/member.php...fo&userid=2556
View this thread: http://www.excelforum.com/showthread.php?threadid=39089

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protection and Grouping

Hi BigT,

See the EnableOutlining property in VBA help.

If you apply protection setting UserInterfaceOnly and EnableOutlining to
true, you can protect the worksheet(s) and yet enable access to the
outlining feature for the user, e.g.:

Sub Tester()
Dim SH As Worksheet

For Each SH In Me.Worksheets
With ActiveSheet
.Select
.EnableOutlining = True
.Protect Password:="drowsap", _
Contents:=True, _
UserInterfaceOnly:=True
End With
Next SH

End Sub

Such protection is not persistent (it reverts to normal protection) and
therefore such code might be placed in the workbooks open event,


---
Regards,
Norman



"big t" wrote in message
...
hi everyone,

I have a worksheet where I have grouped certain rows (using Data...Group
and
Outline...Group) so I have some + and - signs down my left hand margin.

But when I protect the sheet I can't upgroup the rows!!! And there doesn't
seem to be an option for it under Tools..Protection...Protect Sheet.

Any ideas???


TIA
big t



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protection and Grouping

Hi BigT,

Correcting the code,and using the Workbook's open event:

Sub workbook_open()

Dim SH As Worksheet

For Each SH In ThisWorkbook.Worksheets

With SH
.EnableOutlining = True
.Protect Password:="drowsapI", _
Contents:=True, _
UserInterfaceOnly:=True
End With

Next SH

End Sub

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi BigT,

See the EnableOutlining property in VBA help.

If you apply protection setting UserInterfaceOnly and EnableOutlining to
true, you can protect the worksheet(s) and yet enable access to the
outlining feature for the user, e.g.:

Sub Tester()
Dim SH As Worksheet

For Each SH In Me.Worksheets
With ActiveSheet
.Select
.EnableOutlining = True
.Protect Password:="drowsap", _
Contents:=True, _
UserInterfaceOnly:=True
End With
Next SH

End Sub

Such protection is not persistent (it reverts to normal protection) and
therefore such code might be placed in the workbooks open event,


---
Regards,
Norman



"big t" wrote in message
...
hi everyone,

I have a worksheet where I have grouped certain rows (using Data...Group
and
Outline...Group) so I have some + and - signs down my left hand margin.

But when I protect the sheet I can't upgroup the rows!!! And there
doesn't
seem to be an option for it under Tools..Protection...Protect Sheet.

Any ideas???


TIA
big t





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

Thanks Norman, that's fantastic.

cheers
big t

***********************

"Norman Jones" wrote:

Hi BigT,

See the EnableOutlining property in VBA help.

If you apply protection setting UserInterfaceOnly and EnableOutlining to
true, you can protect the worksheet(s) and yet enable access to the
outlining feature for the user, e.g.:

Sub Tester()
Dim SH As Worksheet

For Each SH In Me.Worksheets
With ActiveSheet
.Select
.EnableOutlining = True
.Protect Password:="drowsap", _
Contents:=True, _
UserInterfaceOnly:=True
End With
Next SH

End Sub

Such protection is not persistent (it reverts to normal protection) and
therefore such code might be placed in the workbooks open event,


---
Regards,
Norman



"big t" wrote in message
...
hi everyone,

I have a worksheet where I have grouped certain rows (using Data...Group
and
Outline...Group) so I have some + and - signs down my left hand margin.

But when I protect the sheet I can't upgroup the rows!!! And there doesn't
seem to be an option for it under Tools..Protection...Protect Sheet.

Any ideas???


TIA
big t






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Protection and Grouping

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

big t wrote:

hi everyone,

I have a worksheet where I have grouped certain rows (using Data...Group and
Outline...Group) so I have some + and - signs down my left hand margin.

But when I protect the sheet I can't upgroup the rows!!! And there doesn't
seem to be an option for it under Tools..Protection...Protect Sheet.

Any ideas???

TIA
big t


--

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping and Outlining in Excel using sheet protection Rich Excel Discussion (Misc queries) 2 March 19th 09 07:28 PM
protection and grouping TommyD Setting up and Configuration of Excel 1 May 9th 08 10:27 PM
Protection & Grouping ALK Excel Discussion (Misc queries) 0 May 4th 06 02:45 PM
Sheet Protection - Grouping carlyman Excel Discussion (Misc queries) 3 September 22nd 05 11:43 PM
Excel grouping & protection Smokey Mike Setting up and Configuration of Excel 1 February 12th 05 03:31 AM


All times are GMT +1. The time now is 03:15 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"