Create a macro with button to export multiple charts to separate sheets in single Excel file
I am new to macros overall, but essentially I am trying to create a button that will run a macro that will export multiple charts (5 for this example) to 5 different worksheets in a single Excel file. In a perfect world I'd have the option to set a name for the file as I'll be doing this over and over and don't want it to save everything as the same file name.
So for an example I want to export charts CH653 and CH779 and CH800 and CH675 and CH678 (I'll stop there). I then want to have it rename the sheets to what I want (say "Chart 653" and "Chart779" and "Chart800" ...) and then AutoFit all the columns.
I have tried looking at multiple posts with lots of similarities, but I can't get the charts to get past a second sheet and then none of the columns are auto-sized.
Can anyone provide a script that will do this?
Other details that might be helpful include:
- Save location = "C:\Files\..."
- Charts all have variable #'s of rows depending on the selections/filters applied
- Do I need to specify each sheet as to column range or can you do a blanket column range of "A:BB" or something like that?
i dont have 1 single answer for you. but did you check below link? it has a few different ones which you can combine the principles to achive what you need. from first look combination of #2, #36 and #38 might get you there.
p.s. fyi your end users will need IE plug in for macros to work