Select All charts in active sheet

84wister

New Member
Joined
May 2, 2014
Messages
5
I feel like this should be incredibly straightforward but it's evading me for whatever reason, and i'm getting irritated. I just want a simple one liner that will select all of the charts on the active sheet without having to concern myself with chart names, or grouping. Something functionally equivalent to clicking all of the charts while holding the crtl key. No, recording as a macro doesn't work so please don't tell me thats what i need to do. On my version of excel (i.e. 2007), recording a macro only gives me the last chart i selected. Here's what i've already tried

activesheet.chartobjects.activate
activesheet.chartobjects.select
activesheet.chartobjects.selectall
activesheet.chartobjects.select false

I work with large amounts of data spread cross numerous sheets so solutions where i have to define names, or chart groupings don't work well as names and numbers of charts are constantly fluctuating in what i'm doing. I just need a macro that will easily select all the charts on an active sheet so i can move them around easily, and quickly cut and paste to different sheets via ctrl-c and ctrl-v. Any help would be much appreciated, thanks.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
no that doesn't work charts.select yields a runtime 1004 error of "Method 'select' of object 'Sheets' failed"

ActiveSheet.Charts.Select fails with a runtime 438 error "Object doesn't support this property or method"
 
Upvote 0
Yea that's definitely not working. Has anyone tried running that line in excel 2007? Has anyone tried making a set of charts on one sheet, selecting all manually (i.e. ctrl + 'click'), copying/pasting them to a second sheet, and seeing if that one liner can successfully select all the charts when the second sheet is activated??

For me that line only selects the chart with the highest index out of the ChartObjects collection for the active sheet. That was actually one of the first things i tried.
 
Upvote 0
I have Excel 2010 so perhaps 2007 is different. I did copy and paste three test charts to another sheet and ran the line, it selected them all as well. Do you have charts on multiple worksheets that you're selecting between?
 
Upvote 0
not at all, for now i'm really only concerned with all the charts on whatever sheet i'm currently working on.
 
Upvote 0

Forum statistics

Threads
1,215,403
Messages
6,124,714
Members
449,182
Latest member
mrlanc20

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top