ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to protect sheet allowing grouping and ungrouping but alsoallowing changing colour of specific cells (https://www.excelbanter.com/excel-discussion-misc-queries/245322-how-protect-sheet-allowing-grouping-ungrouping-but-alsoallowing-changing-colour-specific-cells.html)

Anurag Kothari

How to protect sheet allowing grouping and ungrouping but alsoallowing changing colour of specific cells
 
Hi,

I am preparing a template where there are few sheets having
functionality of grouping and ungrouping of rows. I am using below
code for protecting and is working well:

Private Sub Worksheet_Activate()
With Me
..EnableOutlining = True
..Protect "XXX", UserInterfaceOnly:=True
End With
End Sub

Now in a specific sheet I also want to provide user the ability to
change the colour of the specific cells.

Please let me know how to update the above code to support the
requirement.

Any support is much appreciable !!!

-Anurag

Luke M

How to protect sheet allowing grouping and ungrouping but also all
 
Private Sub Worksheet_Activate()
With Me
..EnableOutlining = True
..Protect "XXX", AllowFormattingCells:=True
End With
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Anurag Kothari" wrote:

Hi,

I am preparing a template where there are few sheets having
functionality of grouping and ungrouping of rows. I am using below
code for protecting and is working well:

Private Sub Worksheet_Activate()
With Me
..EnableOutlining = True
..Protect "XXX", UserInterfaceOnly:=True
End With
End Sub

Now in a specific sheet I also want to provide user the ability to
change the colour of the specific cells.

Please let me know how to update the above code to support the
requirement.

Any support is much appreciable !!!

-Anurag


Anurag Kothari

How to protect sheet allowing grouping and ungrouping but alsoall
 
On Oct 13, 1:11*pm, Luke M wrote:
Private Sub Worksheet_Activate()
With Me
.EnableOutlining = True
.Protect "XXX", AllowFormattingCells:=True
End With
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*



"Anurag Kothari" wrote:
Hi,


I am preparing a template where there are few sheets having
functionality of grouping and ungrouping of rows. I am using below
code for protecting and is working well:


Private Sub Worksheet_Activate()
With Me
..EnableOutlining = True
..Protect "XXX", UserInterfaceOnly:=True
End With
End Sub


Now in a specific sheet I also want to provide user the ability to
change the colour of the specific cells.


Please let me know how to update the above code to support the
requirement.


Any support is much appreciable !!!


-Anurag


Hi Luke,

Thanks for the code but I am unable to group and ungroup rows after
using the given code.

Regards,
Anurag


All times are GMT +1. The time now is 04:35 AM.

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