In Excel VBA, these two procedures are exactly what is needed to protect
a chart sheet:
Sub ProtectChart()
Dim oChart As Chart
Set oChart = ActiveChart
oChart.Protect "abc", True, True, True, True
End Sub
Sub UnProtectChart()
Dim oChart As Chart
Set oChart = ActiveChart
oChart.Unprotect "abc"
End Sub
The code is different for an embedded chart, because such a chart cannot
be protected, only locked, while its parent sheet can be protected.
It's hard to see the context of your command, with only that command
posted. On the other hand, I am not experienced in .Net, so the context
may not help.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______