title: Setting maximum and minimum values for x-axis as dates in Excel
body: <p>I have a graph that has dates on the x-axis and I'm trying to set maximum and minimum values for this axis using an Excel VBA. Below is my code which doesnt seem to work.Can anyone please help.</p>
  
  <pre><code>With ActiveSheet.ChartObjects(1).Chart.Axes(xlValue)
      .MinimumScale = ActiveSheet.Range("C33").Value
      .MaximumScale = ActiveSheet.Range("D54").Value
  End With
  </code></pre>