I wrote a VBA subroutine in Excel 2007 to report on the contents of the VBA Project on a worksheet so I could see the number of modules, lines of code, etc.
Then I tried to run this macro with Excel 2010 and it wouldn’t execute. It finally dawned on me that you have to allow access to the VBA project in Settings.
So I had to choose Developer > Macro Security and check the box to Trust access to the VBA project object model.
And then my code ran like a hot knife through butter.