Unable to change plot area size

S

Shinichi

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
 
N

none

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top