Currently I am manually inputting the date of a project as an excel serial number into the Axis options of my chart (Bounds => Minimum).
I am trying to place code in the worksheet to make it update this value automatically upon changing the start date.
I've spent hours on the internet trying to find the code that will work, and piecing together bits of code to do the job, but I keep getting run errors
At the moment I have got to this point with the code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cht As Chart
Dim xmin As Integer
Set xmin = Sheets("Planning").Range("O37").Value
Set cht = Worksheets("Planning").ChartObjects("Chart 2").Chart
cht.Axes(xlCategory).MinimumScale = xmin
End Sub
Thanks in advance for any help!