ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protection and Grouping (https://www.excelbanter.com/excel-programming/335752-protection-grouping.html)

big t

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


TommySzalapski[_21_]

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


Norman Jones

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




Norman Jones

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






big t

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





Dave Peterson

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


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com