size of the plot area

Y

Young-Hwan Choi

How can I adjust the size of the plot area with VBA?

Here's what I've done
After I selected the plot area, I run this macro,
MsgBox Selection.Top
MsgBox Selection.Height

And then, I tried to change the size of the Plot area by using this code,
ActiveSheet.ChartObjects(1).Activate
ActiveChart.PlotArea.Select
With Selection
.Top = 20
.Height = 60
End With

However, when I checked the size with the MsgBox, they were not the size I
specified.
What's wrong with the code?

Thanks.
 

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