From: OMER on
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
From: Peter T on
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" <OMER(a)discussions.microsoft.com> wrote in message
news:FB4B5C5F-3D12-409C-8BCC-7FD97E8FCB49(a)microsoft.com...
> 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


From: OMER on
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" <OMER(a)discussions.microsoft.com> wrote in message
> news:FB4B5C5F-3D12-409C-8BCC-7FD97E8FCB49(a)microsoft.com...
> > 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
>
>
> .
>
From: Peter T on
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" <OMER(a)discussions.microsoft.com> wrote in message
news:C3273E3C-67E0-4A2C-92B2-104D2DDDB584(a)microsoft.com...
> 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" <OMER(a)discussions.microsoft.com> wrote in message
>> news:FB4B5C5F-3D12-409C-8BCC-7FD97E8FCB49(a)microsoft.com...
>> > 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
>>
>>
>> .
>>