Kelvin Stott
Active Member
- Joined
- Oct 26, 2010
- Messages
- 338
I have the following macro, which modifies a chart when the worksheet is recalculated:
How do I get this macro to run ONLY when a data table is recalculated with F9 or on save?
Currently it runs when any part of the sheet is recalculated and blocks the undo function, so I would like to limit this to recalculation of the data table which drives the chart.
Code:
Private Sub Worksheet_Calculate()
Sheet1.ChartObjects("Chart 1").Chart.Axes(x1Value).CrossesAt = Range("Base1")
End Sub
Currently it runs when any part of the sheet is recalculated and blocks the undo function, so I would like to limit this to recalculation of the data table which drives the chart.