ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   trouble setting plotarea size (https://www.excelbanter.com/excel-programming/370731-trouble-setting-plotarea-size.html)

Albert

trouble setting plotarea size
 
Hello... I have not been able to fix the plotarea size of a chart I'm making.
Here's the code:
For Each chtobj In ActiveSheet.ChartObjects
With chtobj
.Width = 200
.Height = 200
End With
Next chtobj
ActiveChart.PlotArea.Width = 1000
ActiveChart.PlotArea.Height = 1000
I want the PlotArea to occupy most of the chart area, hence the 1000...
However, it doesn't work. I'm getting a very smal plotarea.
What to do?
Thanks,
Albert

Franz Verga

trouble setting plotarea size
 
Albert wrote:
Hello... I have not been able to fix the plotarea size of a chart I'm
making. Here's the code:
For Each chtobj In ActiveSheet.ChartObjects
With chtobj
.Width = 200
.Height = 200
End With
Next chtobj
ActiveChart.PlotArea.Width = 1000
ActiveChart.PlotArea.Height = 1000
I want the PlotArea to occupy most of the chart area, hence the
1000... However, it doesn't work. I'm getting a very smal plotarea.
What to do?
Thanks,
Albert


Hi Albert,

try to record (by macro recorder...) a macro while you are setting manually
the plot area size, so you can see what are the right numbers...


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



Albert

trouble setting plotarea size
 
For some odd reason, the procedure works fine when ScreenUpdating = True.
However, when ScreenUpdating = False, the chart proportions get messed up (I
export the chart as jpg. before the procedure finishes). Do you know any way
around this issue?
Thanks,
Albert


All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com