How to programmatically get a chart to look the way I want

rdionne

New Member
Joined
Feb 21, 2002
Messages
47
I am generating a series of charts programatically via VBA. I can mess around with a chart and edit individual elements like the plot and chart area sizes, fonts, legend, etc. But I can't seem to get it always to come out the way I want. If I look at a chart's settings: plotarea.width, etc., get the values, and place them in my VBA code, the chart doesn't come out like the chart I got the values from. The legend may be in the wrong place or the plot area is too large, etc... I even tried saving as a custom chart type, but it seems like Excel is automatically scaling and moving chart elements. Anyone have any tips on how to generate charts via code and have them come out as you would expect?
Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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