i want to understand how doevents works, for animating chart why we should use do events? what i understand doevents is used to stop the macro code from executing, but how this relates to below chart for animating chart, when code reaches to doevents it stops executing, so why then chart refreshes & updates the values in chart?? if i use only application.wait chart popups one time
please can someone explain to me how "doevents" works in this code (chart also attached below)
Dim i As Integer
Application.Calculate For i = 1 To 12 DoEvents
Application.Wait (Now + TimeValue("00:00:01")) Range("c21").Value = i Application.Calculate DoEvents Next i
"The Wait method suspends all Microsoft Excel activity and may prevent you from performing other operations on your computer while Wait is in effect. However, background processes such as printing and recalculation continue."
So a macro comes to a complete standstill during the time specified by Application.Wait.