VBA阻止图表在Excel中自动更新

VBA阻止图表在Excel中自动更新

本文介绍了VBA阻止图表在Excel中自动更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个将数据导入电子表格的按钮。我将计算所得的视觉效果值移植到了仪表板范围之外,并绘制了与这些值链接的图表。每当我导入新数据时,这些值和图表都会立即更改。可以防止图表自动更新,并将该命令移到宏吗?

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?

谢谢

推荐答案

没有办法延迟/推迟更新图表的外观,即使您禁用计算,图表也会在其数据源刷新时刷新,但是您可以将图表指向一个隐藏的工作表上的数据源,并在单击按钮时使用宏更新那里的值。

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.

这篇关于VBA阻止图表在Excel中自动更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:22