Controlling pixels in xy charting


Posted by ereit on October 24, 2000 8:08 PM

Is there a way to control the area that an xy chart covers on the monitor by defining the number of pixels the chart covers?

I am trying to control the physical size and proportion of an xy chart without clicking on the corner of the chart and dragging it manually.

Posted by Ben O. on October 25, 2000 9:56 AM

If you just want to change the size of the plot area, try this:

ActiveChart.PlotArea.Select
Selection.Height = 245
Selection.Top = 122
Selection.Width = 368
Selection.Left = 119

If you want to change the size of the chart window itself, use:

ActiveSheet.Shapes("Chart 1").ScaleWidth 1.17, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Chart 1").ScaleHeight 1.23, msoFalse, _
msoScaleFromBottomRight

I hope this helps,

-Ben



Posted by ereit on October 25, 2000 9:18 PM

Ben
Your idea works great. I have been struggling with this for over 2 years. Even the Microsoft telephone support could not answer that one.

Thank You

Ereit