VBA Prevent Charts from AutoUpdating in Excel

泄露秘密 提交于 2019-12-12 01:46:37

问题


I have a button to import data into my spreadsheet. I ported the calculated values for visuals outside of the dashboard range and plotted charts linking to those values. Whenever I import new data, those values change instantly as well as the charts. Is it possible to prevent the charts from automatically updating, and move that command to a macro?

Thanks,


回答1:


There is no way to delay/defer updating the visuals of a chart, even if you disable calculation, the charts will refresh when its data source refreshes, but you could point your charts to a data source on a hidden sheet, and use a macro to update the values there when a button is clicked.

Let me know in the comments if you get stuck doing this, or if this is not satisfactory.



来源:https://stackoverflow.com/questions/38663426/vba-prevent-charts-from-autoupdating-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!