Hi,
I have some code that changes the axis of an embeddes chart when a user pressed a button. Trouble is, that worksheet and the chart are supposed to be password protected and the code will not work on a protected chart...it blows up.
What is the best way to have the code work and to still have the chart and sheet protected? Do I need to have code unprotect the chart first? Is that a secure thing to do?
Sub ChangeAxisScales()
With ActiveSheet.ChartObjects("Chart5").Chart
' Category (X) Axis
With .Axes(xlCategory)
' .CrossesAt = 1
.TickLabelSpacing = Range("Chart5MajorXTicks")
' .TickMarkSpacing = 2
' .AxisBetweenCategories = True
' .ReversePlotOrder = False
End With
End With
Lawrence
Bookmarks