Compile error in hidden module: This Workbook


  • I have a spreadsheet application developed in Excel 2007, and it works in both Excel 2007 and Excel 2010 (32-bit).

    There is a lot of VB and data connections behind it as well as password protections to keep people from accessing the code.  So far, no real problems until yesterday when I get the following:

    1) user purchased stand-alone Excel 2010 and gets the "Compile error in hidden module: ThisWorkbook".  He then downloads a trial version of Office 2010 and that issue doesn't come up in Excel 2010, but it appears there is a block on brining in XML data into the worksheet? Does Microsoft limit functionality in a trial version?

    2) other user tried it in OnLive Desktop and gets the same error message. I confirmed with OnLive that they have Office 2010 32-bit with no special add-ins or third-part software.

    I would try and test these, but since I don't get the error on either computer I have (Vista with Office 2007, and Windows 7 with Office 2010) I'm not sure how to help them.  Any suggestions would be much appreciated.



    Thursday, March 22, 2012 8:03 PM


  • Hi,

    There is one suggestion given from the help when I encounter the compile error:

    Compile error in hidden module: <module name>
    A protected module can't be displayed. This error has the following cause and solution:
    There is a compilation error in the code of the specified module, but it can't be displayed because the project is protected. 
    Unprotect the project, and then run the code again to view the error.

    I would suggest you compare the references in VBE and the versions of Office SP which installed on the clients.

    Rex Zhang

    Rex Zhang

    TechNet Community Support

    Tuesday, March 27, 2012 7:07 AM