Sheet and Chart protection conflict(protect charts against deleting but not against moving) RRS feed

  • Question

  • Hello guys,

    Im developing a document-level Excel Add-in using .NET 4, C# and Excel&VSTO 2010.

    The applicaction Im developing has two modes of operation, User and Administrator.

    What I want to do is to protect the content(cells,values,charts ) of the sheets that have been edited by the Administrator when the app is running in User mode. So the User cant modify the content added by the Administator.

    I want Users to be able to move the charts over the sheet(floating charts) but not to be able to delete them...but I dont know how to achieve this behaviour because when I protect a sheet that contains charts, charts get embedded in the sheet and can not be deleted but also can not be moved....

    I have tried using the properties of the Charts such as: ProtectdFormatting,ProtectSelection but those are not what I need.

    Im afraid that this cant be done...I hope someone can give me some tips.

    Thank you in advance.

    • Edited by cocoVSTO Tuesday, April 3, 2012 9:47 AM mistake
    Tuesday, April 3, 2012 9:45 AM

All replies

  • Hi cocoVSTO,

    Thanks for posting in the MSDN Forum.

    It seems you have a complex requirement of Chart and Sheet. I will involve some experts into this issue to see whether they can help you.

    There might be some time delay, appreciate for your patience.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, April 5, 2012 10:08 AM
  • Hi Tom,

    Just to clarify a little my previous post causemaybe is not too clear.

    When I talk about user and administrator Im not talking about User and Administrator in the context of the Operating System.

    It is just my add-in is going to be used by two diferent user´s rols. I talked about User&Administrator rols but I could have used another name as Instructor&Operators or so on.The key is that a User rol cannot modify what the Instructor rol did, so I have to protect the sheets and charts...

    Hope this explanation could help to clarify the situation.

    Friday, April 6, 2012 9:51 PM
  • Hello cocoVSTO,

    Please tell us whether you can do what you want directly through the user interface of Excel.  If you can please post the steps to repro what you did when you suceeded so we can explore how to do that programmatically.

    Make your repro steps using the minimum configuration of Excel.

    Chris Jensen
    Senior Technical Support Lead

    Chris Jensen

    Wednesday, April 18, 2012 3:21 PM