![]() |
Editing a Chart on a protected worksheet
Hola,
I wonder if there is a way to allow the user to edit an embedded chart within a protected worksheet. I know that setting the parameter DrawingObjects=True (when protecting the worksheet) allows for editing while protected. However, in the worksheet there are other shapes that I don't want the user to be able to edit. Is there a way accomplish this using VBA code? Thank you in advance for your reponse. OMER |
Editing a Chart on a protected worksheet
With the sheet unprotected...
Select the chart as a chartobject (hold ctrl and select) Right click, Protection, untick Locked Protect the sheet Regards, Peter T "OMER" wrote in message ... Hola, I wonder if there is a way to allow the user to edit an embedded chart within a protected worksheet. I know that setting the parameter DrawingObjects=True (when protecting the worksheet) allows for editing while protected. However, in the worksheet there are other shapes that I don't want the user to be able to edit. Is there a way accomplish this using VBA code? Thank you in advance for your reponse. OMER |
Editing a Chart on a protected worksheet
Thank You so much Peter.
I was not familiar with the object approach outside VBA. For some reason I couldn't select the object as you instructed. However, I used the Find&Select option on the Ribbon to select the chart and then I could follow your instructions. Thanks again. OMER "Peter T" wrote: With the sheet unprotected... Select the chart as a chartobject (hold ctrl and select) Right click, Protection, untick Locked Protect the sheet Regards, Peter T "OMER" wrote in message ... Hola, I wonder if there is a way to allow the user to edit an embedded chart within a protected worksheet. I know that setting the parameter DrawingObjects=True (when protecting the worksheet) allows for editing while protected. However, in the worksheet there are other shapes that I don't want the user to be able to edit. Is there a way accomplish this using VBA code? Thank you in advance for your reponse. OMER . |
Editing a Chart on a protected worksheet
You could of course do same with VBA. Normally I'd suggest record a macro
but as the macro recorder doesn't work fully with shapes and charts, try something like this Sub test() Dim sPW As String Dim ws As Worksheet sPW = "abc" Set ws = ActiveSheet ws.Unprotect Password:=sPW ws.Shapes("Chart 1").Locked = False ws.Protect Password:=sPW, _ DrawingObjects:=True, _ Contents:=True, _ Scenarios:=True End Sub Regards, Peter T "OMER" wrote in message ... Thank You so much Peter. I was not familiar with the object approach outside VBA. For some reason I couldn't select the object as you instructed. However, I used the Find&Select option on the Ribbon to select the chart and then I could follow your instructions. Thanks again. OMER "Peter T" wrote: With the sheet unprotected... Select the chart as a chartobject (hold ctrl and select) Right click, Protection, untick Locked Protect the sheet Regards, Peter T "OMER" wrote in message ... Hola, I wonder if there is a way to allow the user to edit an embedded chart within a protected worksheet. I know that setting the parameter DrawingObjects=True (when protecting the worksheet) allows for editing while protected. However, in the worksheet there are other shapes that I don't want the user to be able to edit. Is there a way accomplish this using VBA code? Thank you in advance for your reponse. OMER . |
All times are GMT +1. The time now is 12:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com