Hello,
I need to automatically export three charts as .png files and save them somewhere on my machine. I found a user-made add-in here that can save excel charts as images to any location, but I can't seem to code a module that automatically does this for 3 charts...
What I did was install the add-in and verify that it works manually, which it does. The add-in module installs a button in the "Add-Ins" tab called Export Chart, which brings up a Save As dialogue upon being clicked when a chart is highlighted. So saving charts one-by-one isn't a problem. However, I then recorded a macro of simply clicking on my first chart, clicking the Export Chart Add-In button, specifying the file name and location, confirming the save, and moving on to do the same for charts 2 and 3, which are on independent sheets. This resulted in the automated macros all completing successfully, but none of the charts being saved externally as .png files. Can anyone offer some advice please?
The macro-enabled excel file is attached to this post, which contains my string of module calls under "This Workbook" (which all are successful even though the final module attempting to export 3 charts doesn't do that) as well as the installed add-in code which is now automatically associated with each workbook I open (PTSExportChart). The data file read-in by excel and the workbook which installs the Export Chart add-in can also be found at the attached link.
Thanks for the help!
dac5039
I need to automatically export three charts as .png files and save them somewhere on my machine. I found a user-made add-in here that can save excel charts as images to any location, but I can't seem to code a module that automatically does this for 3 charts...
What I did was install the add-in and verify that it works manually, which it does. The add-in module installs a button in the "Add-Ins" tab called Export Chart, which brings up a Save As dialogue upon being clicked when a chart is highlighted. So saving charts one-by-one isn't a problem. However, I then recorded a macro of simply clicking on my first chart, clicking the Export Chart Add-In button, specifying the file name and location, confirming the save, and moving on to do the same for charts 2 and 3, which are on independent sheets. This resulted in the automated macros all completing successfully, but none of the charts being saved externally as .png files. Can anyone offer some advice please?
The macro-enabled excel file is attached to this post, which contains my string of module calls under "This Workbook" (which all are successful even though the final module attempting to export 3 charts doesn't do that) as well as the installed add-in code which is now automatically associated with each workbook I open (PTSExportChart). The data file read-in by excel and the workbook which installs the Export Chart add-in can also be found at the attached link.
Thanks for the help!
dac5039