Dear all,
At our firm, we have an Excel template which produces a set of charts from accounting data and automatically inserts them into a powerpoint presentation.
The below code was used to set the visual properties of the charts, such as a width, positioning of certain elements etc.
However, recently, we switched from Office 2003 to Office 2010 and suddenly, the following error message occurs (translated from Swedish) "The method 'width' in the object 'PlotArea' failed"
The same error occurs on the similar lines below, i.e. ".PlotArea.Height" etc., and also occurs even if I change the value to a higher number. Setting the width/height to 1 is done because otherwise I can't set the other properties right.
Everything worked perfectly in Excel 2003.
Now comes the really peculiar phenomenon. I noticed that after every error, when I restart the macro, it is able to do another chart. I.e., at run 1 it changes chart 1. After the fifth run, it changes chart 1,2,3,4,5 etc. Finally, when I have gone through all charts, it runs perfectly, even though I make changes to the charts etc. However, when I save and reopen the file, I am back to square one.
You've probably noticed that I'm somewhat of a hobby programmer so please reply accordingly ;-)
Thanks.
//BRKJ
Bookmarks