autosize a chart

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Damon Ostrander

MrExcel MVP
Joined
Feb 17, 2002
Messages
4,239
Hi wildman,

VBA can size a chart, and in fact can change almost any property or characteristic of a chart. If you could be more specific about what you mean by 'autosize' I could perhaps provide some code.

Damon
 

wildman

New Member
Joined
Sep 5, 2002
Messages
6
i have a macro that changes the range used for the chart. this is based on the amount of records existing. Some days its 3 and some its 30 I need the chart to size itself accordingly so if many records arive on a day it will fit them in. i actually may have nailed it with chart.font.autosize = true .. exact syntax i cant remember but i think it works. from what i can see it makes the font smaller to fit the data in the chart. I'll know on monday as this records all problems encountered in my datacenter from workday to workday. On a weekend the data can be 30 or more records. the chart plots total problems by type. another vba macro counts the problems by type into an array. that array is applied to the chart. then the autosized font applied. I can give you the code im using on monday if it will shed some light. mabey there is a better way. But ill know monday if my way worked.
 

Forum statistics

Threads
1,144,360
Messages
5,723,903
Members
422,526
Latest member
edminty84

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
Top