controlling chart size

  • Thread starter Thread starter bbxrider
  • Start date Start date
B

bbxrider

excel 2000
have a chart that gets redrawn as cell values change
i manipulate the axes quite a bit, etc and this can cause the size of chart
to expand and i want to keep it the original size,
so after an expansion, i recorded a macro while resizing it back to the
original size and but that code doesn't resize the chart when run in vba??
i stepped thru the code to make sure it actually gets run
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.12, msoFalse,
msoScaleFromTopLeft
is there some prequisite i missed? or some way i need to use specifically
when
the code is run in vba?
 
Hi,

Using scalewidth is probably setting the new width of the chart
relative to its existing size (not its size before you changed)

Try using width, which sets the exact width in points eg

ActiveSheet.Shapes("Chart 1").Width = 35
 
Back
Top