Compile error in hidden module Automation

I have recently been issued with a mathematical model in an Excel spreadsheet. This involves copious numbers of sheets, with many macros and a boatload of VBA behind the scenes.

But the model is rather old and was last known to work on Windows XP, Excel 2003. I am currently using Windows 8.1 and Excel 2013, and it is producing the error message:-

Compile error in hidden module: Automation

twice on starting up and once on closing down; the model doesn't work either although no further error message is produced.

Does anyone know how to fix the problem causing this message to appear? (I suspect the model's failings are related to this.)

5

1 Answer

Have you updated the VBA project references?

The minimum should include: Visual Basic For Applications, Microsoft Excel 15.0 Object Library, and Microsoft Office 15.0 Object Library.

To set these,
Open the Visual Basic editor (Alt+F11)
Select Tools
Select References
Scroll through until you find the library and click on the box to add/remove a check.

Outdated references can cause problems when running older VBA scripts.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like