autosize a chart

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,937
Latest member
BeerMan23

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