Hi all,
From another thread I found out how to link a chart's x-axis min/max from cell values when the chart is its own sheet. The code is
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("s6:s7"), Target) Is Nothing Then
With Sheets("Chart")
With .Axes(xlCategory)
.MaximumScale = Range("$s$7").Value
.MinimumScale = Range("$s$6").Value
End With
End With
End If
End Sub
Now I need to have that apply to a chart that is an object in a sheet and not it's own sheet. For example, my sheet is named "Main" and that has the data, calcs, and chart all in it.
I think it's only a matter of going from "Sheets" to something else. Any help would be much appreciated.
Thanks,
Mike
Bookmarks