autosize a chart

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

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,181,335
Messages
5,929,377
Members
436,665
Latest member
MonkeyNotDonkey

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