Compile error in hidden module: This workbook.

Anonymous
2010-08-19T09:56:57+00:00

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.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2012-04-23T16:52:38+00:00

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.

Was this answer helpful?

200+ people found this answer helpful.
0 comments No comments

58 additional answers

Sort by: Oldest
  1. Anonymous
    2015-03-04T16:24:07+00:00

    I had the same problem for a user.  I had built a password protected workbook.  The workbook functioned correctly on my PC, but recieved the "Compile error in hidden module...." on his desktop.

    I went to his desktop, temporarity unprotected the workbook, opened VB Project, and tried to compile.  The compile failed, and the missing library was immediately visible in the Tools | References dialog.  I installed the missing library, and the problem was fixed.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-03-05T23:15:32+00:00

    Hi RobAmick,

    I did this but problem remain the same. Here are some thing different which i noticed:

    1. When i delete those file fromC:\Users\USERNAME\AppData\Roaming\Microsoft\Forms, open Macro Excel file, those files ComctlLib.exd and MsComctlLib.exe won't create again. So this folder become empty now.
    2. Those file will be created in C:\Users\USERNAME\AppData\Local\Temp\Excel 8.0.
    3. On different systems, i can see the size of those file might be different meant it must be different version. Do you have any idea?

    Thank you.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-03-05T23:17:04+00:00

    Hi DianaSAllen,

    May i know how you install the missing library as am new with Macro issue?

    Thank you.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-03-10T19:08:36+00:00

    I know this is an old post, but all the fixes mentioned here (and other places) did not work for me.

    There were no exd files in any of the folders mentioned, so I'm hoping I can help someone who is still having the issue:

    If you go into AppData and do a search for *.exd - then delete every one of them you find.

    I found 4 exd files with several different names in several different places. After deleting all of them, the macro enabled workbook opened with no problem.

    Cheers!

    BJH

    Was this answer helpful?

    0 comments No comments