Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Protect Chart

Sub ProtectChart()     Dim myChart As Chart     Set myChart = ThisWorkbook.Sheets("Protected Chart")     myChart.Protect "Excel2003", True, True, , True     myChart.ProtectData = False     myChart.ProtectGoalSeek = True     myChart.ProtectSelection = True     Debug.Print myChart.ProtectContents     Debug.Print myChart.ProtectDrawingObjects     Debug.Print myChart.ProtectionMode     Debug.Print myChart.ProtectData     Debug.Print myChart.ProtectGoalSeek     Debug.Print myChart.ProtectSelection End Sub