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: Newest
  1. Anonymous
    2012-08-29T16:52:56+00:00

    I also had the problem a while back & the previous fix of deleting the MSComCtlLib.exd worked but this time it doesn't fix the problem.

    I have tried deleting all .exd files from anywhere on the C drive & this hasn't fixed it either.

    Windows 7 Pro 64 bit

    Office 2010 32 bit

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-08-29T15:04:13+00:00

    You can delete all .exd files.  They are recreated when needed.  So it could be an .exd file but not one of the ones listed.  So as I say, you can delete all .exd files and see if that helps.

    --

    Regards,

    Tom Ogilvy

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-08-29T10:58:42+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.

    Hi. This problem occurred for me a few months ago, and your above steps solved it. However, after a recent Windows Update ran, it has happened again, and this time that above fix does not work. Any ideas? I am running Office 2007 on Windows XP

    Thanks

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-08-14T12:21:08+00:00

    Thanks a lot Rob!

    Was this answer helpful?

    0 comments No comments