Hi
I have a workbook looking at a time series of population data. When the macro is run the data is updated every second with the following years data. This continues until the final year of data is displayed. A chart is based on this data and the idea is that when the macro is run the data is updated and the chart displays the changing population year on year.
We have recently upgraded to Excel 2016 and while the macro still works and the data still updates the chart does not until the macro finishes, then the chart displays the data from the final year.
When viewed in an older version of Excel the macro works, the data updates and the chart updates as well
I really don't understand why the data is updating but the chart isn't and I'm hoping one of you very clever people can help me. I'm wondering if I need a line of code after the data updates each time which forces the chart to update?
This is a sample of the macro. It repeats 26 times until it reaches the end of the timeseries.
Sub AnimatePyramid()
'
' AnimatePyramid Macro
DelayTime = TimeValue("00:00:01")
ScreenUpdating = False
ActiveSheet.Range("L1").Select
ActiveCell.FormulaR1C1 = "1"
Range("m1").Select
Application.Wait Now + DelayTime
ActiveSheet.Range("L1").Select
ActiveCell.FormulaR1C1 = "2"
Range("m1").Select
Application.Wait Now + DelayTime
ActiveSheet.Range("L1").Select
ActiveCell.FormulaR1C1 = "3"
Range("m1").Select
Application.Wait Now + DelayTime
ScreenUpdating = True
End Sub
Bookmarks