Hello,
I have a VBA macro that re-formats an Excel Chart (in a separate tab) for specific specific chart area that works in 2007.
This does not work in Excel 2010. I get the error Run-time error '-2147024809 (80070057)': The specified value is out of range. It also does not matter what value I try to use. (By default Top = 0, Left =0, Width = 747.75, Height =531.75).
I can not move the chart area manually either. The workbook is not protected (as far as I can tell) and in the Format Chart Area it was Locked (but should not matter since the sheet is not protect) but I took that off also.
If I say PlotArea instead of ChartArea this will change the plot area position.
It's obvious I am missing something fundamental. Can anyone enlighten me. Thanks.
Sincerely,
___________________________________
Michael J. Virostko
I have a VBA macro that re-formats an Excel Chart (in a separate tab) for specific specific chart area that works in 2007.
Code:
ActiveChart.ChartArea.Select
With Selection
.Top = 0
.Left = 0
.Width = 745 '735
.Height = 530 '530
.Border.LineStyle = xlNone
.Interior.ColorIndex = xlNone
End With
This does not work in Excel 2010. I get the error Run-time error '-2147024809 (80070057)': The specified value is out of range. It also does not matter what value I try to use. (By default Top = 0, Left =0, Width = 747.75, Height =531.75).
I can not move the chart area manually either. The workbook is not protected (as far as I can tell) and in the Format Chart Area it was Locked (but should not matter since the sheet is not protect) but I took that off also.
If I say PlotArea instead of ChartArea this will change the plot area position.
It's obvious I am missing something fundamental. Can anyone enlighten me. Thanks.
Sincerely,
___________________________________
Michael J. Virostko