I realize this thread is very, very old, but I just ran into this problem and wanted to contribute.
Following one of the links provided in the previous post, I followed the Microsoft advice about adding "Option Explicit" to my VBA code and the problem seems to have gone away for good. In my case, the error was occurring when trying to add a text box to a pivot chart in Excel 2007 via macro.
It's too early to tell for certain, but this also seems to have had the side benefit of solving a really weird problem I was having in which chart tabs were renaming themselves from the descriptive names I was giving them to the default names of Chart1, Chart2, etc. I never did find a solution to this other problem via Google searching.