Compile error in hidden module: This workbook.

I've got the following error after installing office 2010. It's only shown once I want to open/close the Excel:

Microsoft Visual Basic for Applications:

Compile error in hidden module: This workbook.

This error commonly occurs when code is incompatible with the version, platform, or architecture of this application.

 

Question Info


Last updated June 3, 2020 Views 167,883 Applies to:
Answer
Answer

After searching for answers to this problem repeatedly I finally came up with this...if anyone besides me is still having this problem, hopefully this will help.

 

Excel shows a "compile error in hidden module: thisworkbook" when opened or closed.

This error occurs because 2 excel files are corrupted.


To stop the error from occurring:

If in Windows XP open the following folder:
C:\Documents and Settings\USERNAME\Application Data\Microsoft\Forms     where USERNAME is the current user


If in Windows 7 open the following folder:
C:\Users\USERNAME\AppData\Roaming\Microsoft\Forms     where USERNAME is the current user


Once the folder is located, delete these 2 files

ComctlLib.exd
MSComctlLib.exd

Excel should now open without the error message.

Note: Excel will create 2 new files (with the same names) in the folder, but they will not be corrupted.

246 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.