Hi, some years ago I got some help creating the code below, which sets chart parameters (scale etc) from values in named worksheet cells. It works great. Except that it does this to every chart on a given worksheet, while now, I only want it to do something to one specific chart, which I've named "Target_chart". Sorry, I know this is something quite basic; but how can I modify this code to do this?
Code:
Sub ChangeAxisScales()
Dim objCht As ChartObject
For Each objCht In ActiveSheet.ChartObjects
With objCht.Chart
' Value (Y) Axis
With .Axes(xlValue)
.MaximumScale = ActiveSheet.Range("Axis_max").Value
.MinimumScale = ActiveSheet.Range("Axis_min").Value
.MajorUnit = ActiveSheet.Range("Unit").Value
End With