I've got a problem with a well-functioning VB module written for an Excel 2002 project. I'm now trying to use this same VB project in Excel 2007 Entreprise, but the error handlers do not work anymore. It seems that seemingly inoccuous code generates an internal Err 9. If I remove the error handler it will still generate Err 9 but will not halt the program. An example is:

Sub ClearPasteData()

Sheet2.Cells.ClearContents
Sheet3.Cells.ClearContents
Debug.Print Err.number
....

This should not be an error. It works in Excel 2002. It still works in Excel 2007, but it produces Err 9 when there is no error at all. Has anything changed in Excel 2007?