Sizing Charts in Excel (Help!!!)


Posted by Carolyn Wong on March 28, 2001 12:29 AM

Hi experts,

I'm trying to size a chart in Excel using VBA script. I tried deriving the coding to perform such a task by recording this into a macro. The coding resulted was as following :

ActiveSheet.Shapes("Chart 1032").ScaleWidth 1.5, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 1032").ScaleHeight 1.5, msoFalse, msoScaleFromTopLeft

The figure 1.5 specifies the ratio between the height of the shape after you resize it and the current or original height. In this case, it will make the width and height both to be 50 percent larger, than the original or current chart.

The only problem is that, I need a method which I can use to specify exactly what dimensions (in pixels) I want my final chart to have.

If there's anyone out there who has come across with this and was able to solve it, please let me know as soon as possible !!! It'd be very much appreciated.

Regards,

Caz.



Posted by Dave Hawley on March 28, 2001 3:41 AM


Hi Caz

Possibly the easiest way to achieve this is to create a chart on a hidden sheet and then refer to it's dimensions to size all other charts.


Dave

OzGrid Business Applications