Hi,
My issue:
I have multiple charts over multiple tabs and only have a certain area space within each tab to work in.
I was wondering if there is a way of standardising the charts so that they are all the same size, Or if there is any VB code that could help me?
Any help would be great
Thanks
Chris
Manually you can change the width/height of the chart area for all charts on a single sheet.
Just select all the chart objects and then use the Format dialog to change the Size values.
Or with code you can loop through worksheets.
Sub X() dim shtTemp as worksheet for each shttemp in activeworkbook.worksheets if shttemp.chartobjects.count > 0 then shttemp.chartobjects.width =420 shttemp.chartobjects.height =300 endif next Edn Sub
Thanks for this, it's worked great.
Just out of curiosity is there any code to make the actual graphs the same size aswell and not just the whol chart?!
Thanks
Chris
you would need to alter the PlotArea properties.
Note that the category and values axis labelling with cause problems if they are not consistent between all the charts.
To get the plotarea sized the same you need to adjust the PlotArea properties such as Left and Width whilst monitoring the InsideLeft and InsideWidth values.
The inside values are those of the area where the columns/lines/markers etc appear, but they are read-only.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks