# Refresh Image or Plot with Button/Macro

**URL:** <https://forum.anaconda.com/t/refresh-image-or-plot-with-button-macro/88426>\
**Category:** How-To\
**Created:** [November 20, 2024, 1:40am UTC](https://forum.anaconda.com/t/refresh-image-or-plot-with-button-macro/88426 "2024-11-20T01:40:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Finch](https://avatars.discourse-cdn.com/v4/letter/_/00a5b5/32.png) [@\_Finch](https://forum.anaconda.com/u/_Finch)\
**Post date:** [November 20, 2024, 1:40am UTC](https://forum.anaconda.com/t/refresh-image-or-plot-with-button-macro/88426/1 "2024-11-20T01:40:24Z")

</div>

Hi,

Is there a method to have the image/plot created by a script only refresh when prompted by a Button/Macro instead of refreshing every time a separate cell is updated?

Thanks

---

<div class="post-metadata">

**Author:** ![OwenPrice](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/owenprice/32/5105_2.png) [@OwenPrice](https://forum.anaconda.com/u/OwenPrice)\
**Post date:** [November 20, 2024, 3:43pm UTC](https://forum.anaconda.com/t/refresh-image-or-plot-with-button-macro/88426/2 "2024-11-20T15:43:29Z")

</div>

In Python in Excel you can use Manual or Partial calculation mode to gain more control over how cells are refreshed.

See the “Recalculation” section [here](https://support.microsoft.com/en-us/office/get-started-with-python-in-excel-a33fbcbe-065b-41d3-82cf-23d05397f53d) for more details.

Controlling calculation and creating Python cells with VBA is also possible.

I made an [example video](https://youtu.be/Evhl42i3o5I?feature=shared) some time ago which shows how to create a Python cell from VBA. It isn’t directly related to your ask, but may provide some ideas for you to work from.
