How to protect sheet allowing grouping and ungrouping but alsoallowing changing colour of specific c

A

Anurag Kothari

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
 
L

Luke M

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

Anurag Kothari

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!*

Hi Luke,

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

Regards,
Anurag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top