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: Most helpful
  1. Anonymous
    2015-10-15T05:03:18+00:00

    I have facing same problem i have update our MS Office 2007 to Office 365 and this problem short out.

    Rupesh Soni

    9873973787

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-08-03T14:59:40+00:00

    I have the same issue while trying to open Microsoft Visual Basic Excel sheets,

    in both office 2010 and 2013 getting the same error.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-05-20T13:35:08+00:00

    Hi All,

    Thanks very much for your reply, my issue has been solved after our engineer deploy new Ms Office hotfix recently for all machines. It automatically solved after this patch and no action required.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-05-19T19:19:24+00:00

    I have tried all these as well, I had a user with this issue recently and cleared Excel in the registry and has resolved the error on open and close of Excel, delete the Excel  key container here: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel (Note this is Office 2010 the numbers will be different in the Office directory depending on version):

    Office 2007 - 12.0

    Office 2010 - 14.0

    Office 2013 - 15.0

    Was this answer helpful?

    0 comments No comments