ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   size of the plot area (https://www.excelbanter.com/excel-programming/291123-size-plot-area.html)

Young-Hwan Choi

size of the plot area
 
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.




All times are GMT +1. The time now is 10:32 AM.

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