Can't refresh a chart in Excel VBA (Excel 2016)

后端 未结 2 1960
遇见更好的自我
遇见更好的自我 2021-01-24 07:30

My son (15 y) is studying pendulum at school, physics lessons. I am trying to help him with a simulated pendulum in Excel, using 2 points chart, one fix (where the \"cord\" of

2条回答
  •  迷失自我
    2021-01-24 07:45

    Sounds like a DoEvents problem. Just put DoEvents in your code like so:

    ...
    ActiveSheet.ChartObjects("Chart 1").Chart.Refresh
    DoEvents
    Sleep (50)
    ...
    

提交回复
热议问题