ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unable to change plot area size (https://www.excelbanter.com/excel-programming/278035-unable-change-plot-area-size.html)

Shinichi

Unable to change plot area size
 
Hello,

I have developed a Pie-chart with VBA in Excel XP.
It creates a Pie-chart but its plot area size is too small.
Furthermore, the Pie-chart does not let me manually change
its size so I can not even record Maco.

I wrote the following code but I got an error "Unable to
set the Height property of the PlotArea Class".

With ActiveChart
.ChartType = xl3DPieExploded
.PlotArea.Height = 155
.PlotArea.Width = 389
End With

Any help is appreciated,
Shinichi

none[_2_]

Unable to change plot area size
 
The height and width can not exceed the chart size.
Try something like this before your code:
Sub resizePie()

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
Worksheets("Sheet4").ChartObjects("Chart 2").Height =
1500
Range("A1").Select

End Sub
-----Original Message-----
Hello,

I have developed a Pie-chart with VBA in Excel XP.
It creates a Pie-chart but its plot area size is too

small.
Furthermore, the Pie-chart does not let me manually

change
its size so I can not even record Maco.

I wrote the following code but I got an error "Unable to
set the Height property of the PlotArea Class".

With ActiveChart
.ChartType = xl3DPieExploded
.PlotArea.Height = 155
.PlotArea.Width = 389
End With

Any help is appreciated,
Shinichi
.



All times are GMT +1. The time now is 02:32 PM.

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