Is it possible to add charts to a custom collection?

rkaczano

Board Regular
Joined
Jul 24, 2013
Messages
141
Office Version
  1. 365
Platform
  1. Windows
Is it possible to create a custom collection and add Chart Objects to it?

I know their is an existing collection in the object model based on ActiveSheet.ChartObjects which I can loop through.

But I want to group two sets of charts (10 charts total but two groups of 5x charts) on a sheet so that I can manipulate the formatting via VBA.

So I want to create two custom collections, add the relevant charts to each collection. loop through each collection and then undertake separate VBA formatting for each collection.

Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
When you say custom collection, it sounds like you're assuming a Class is required?

You can very easily add specified ChartObject's to a standard VBA Collection, and loop through the Collection. Have you tried doing this?
 
Upvote 0
When you say custom collection, it sounds like you're assuming a Class is required?

You can very easily add specified ChartObject's to a standard VBA Collection, and loop through the Collection. Have you tried doing this?
Yes you are right - I had it in my head that I needed a custom collection - thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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