Can you help me with this? I want to generate a minimum axis value for my chart based on a cell reference.
Here is my code.
Private Sub Worksheet_calculate() With ActiveChart.Axes(xlValue) .MinimumScale = Worksheets("Chart Data").Range("E111").Value End With End Sub
ActiveChart. You need to write:With Worksheets("Sheet2").ActiveChart.Axes(xlValue). That worked for me.E111getting calculated? The issue is withActiveChart. If you are inChart Datawhen the calculation happens then you get an error as the chart is not active. Instead, try referencing the chart directly by name...