When it comes to Microsoft Office error messages, there's always a long story behind them. Users report hundreds of different error messages when trying to open Word, Excel, or PowerPoint. We've already covered how to fix some common issues like the runtime error 1004 or an invalid add-in template. This time, we'll discuss another error – a compile error in a hidden module.

Users often encounter this error message when starting Excel. In some rare cases, it may also pop up when launching MS Word. Usually, users see one of the following error messages:

  • Hide compile errors in module: AutoExec
  • Hide compile errors in module: AutoExecNew
  • Hide compile errors in module: DistMon

Compile Error in Hidden Module

The different suffixes mean you can blame different culprits, which is why there are multiple solutions to your problem. Before looking at the fixes, it's worth understanding why you're seeing these error messages in the first place.

Why do I see the error message "Compilation error in hidden module"?

Now that Office 2016 has upgraded from 32-bit to 64-bit, you might receive a “Compile error in hidden module” message if you have some 32-bit versions of Office add-ins that aren't compatible with the 64-bit version on your computer.

The two most common scenarios that cause this error are:

The Adobe Acrobat PDFMaker add-in has issues if both of the following template files are present in the Startup folder for Microsoft Excel:

    • Pdfmaker.dot
    • Pdfmaker.xla

2. You have Norton AntiVirus installed on your computer.

Now that you know the reasons behind this error message, it's time to apply the fixes. We've listed four solutions for you to try one by one until the problem is resolved.

Method 1: Re-registering the OCX File using CMD

The first solution you can try is to re-register some core Excel DLL files. In this method, we need to use the Windows Command Prompt.

Step 1: Press the Windows + R keys at the same time. Type cmd in the Run dialog box.

Open cmd in the “Run” box Open cmd in the Run box

Step 2: Type the following command and press Enter.

For the 32-bit version:

The command "regsvr32 -u C:\Windows\System32\mscomctl.ocx" is used to uninstall the mscomctl.ocx control located in the C:\Windows\System32 folder. Running this command in the command line unregisters the Dynamic Link Library (DLL) file.

The command "regsvr32 c:\windows\system32\mscomctl.ocx" is used to register a control library file, "mscomctl.ocx," within the Windows system. Running this command in the Command Prompt registers the file with the system registry, allowing other programs to utilize the control properly. It typically requires administrative privileges to execute.

For the 64-bit version:

The command "regsvr32 -u c:\windows\system64\mscomctl.ocx" is used to uninstall the Microsoft Common Control Library control located at C:\Windows\System64\mscomctl.ocx. Running this command in the command line unregisters the OCX file.

regsvr32 C:\Windows\System32\mscomctl.ocx

Step 3: Now run MS Excel again and check if the error message still exists.

Method 2: Delete the .exd Files

.EXD files are cache files for control information used by Microsoft Office. These files are created when ActiveX controls are inserted into a document using the Control Toolbox in an MS Office program. You can try deleting this cache file to see if it resolves any compile errors in hidden modules.

Step 1: Press the Windows + R keys at the same time. Type %appdata% in the Run dialog box.

This will open your “AppData” folder. Go to “Roaming” > “Microsoft” > “Forms”.

Step 3: Find the .exd files and select both comctllib.exd and mscomctllib.exd. Delete these two files.

Step 4. Restart Excel and see if the problem is fixed.

Method 3: Move the PDF Creator File

As mentioned above, one of the reasons why you see this error message is having two template files in the Adobe Acrobat PDF Maker add-in. Hence, in this method, you can resolve your issue by moving the PDF Maker files to another location. Here are the detailed steps.

Step 1: Open Windows Explorer and search for pdfmaker.* on your computer.

(2) Select the pdfmaker.dot and pdfmaker.xla files, right-click them, and choose Cut.

Step 3: Copy both files to your desktop.

Now you can restart MS Excel and see if the issue is resolved.

Method 4: Update to the latest version of Adobe Acrobat

If none of the above solutions resolve the “Compile Error in Hidden Module” issue, your last resort would be to update Adobe Acrobat to its latest version, as the problem is related to the Adobe Acrobat installed on your computer.

Visit the official Adobe website and download the latest version of Acrobat to your computer.

Related Articles

How to Solve the Word Runtime Error 91?

Runtime errors are common program issues, usually occurring in Microsoft Office software. This article will explain the causes of this error and how to fix it.

Runtime Error 91

Additional Solution: Efficiently Repair Corrupted or Damaged MS Excel Files

Hopefully, you have resolved the compile error in the hidden module of Excel through the methods above. Then, we would like to introduce an excellent auxiliary tool – Fixo Document Repair Tool.

It is an advanced 4-in-1 professional repair tool that lets you fix corrupted PDF files and multiple Office file formats. In case your documents get damaged, the Tool File Repair software efficiently scans and repairs them.

If you want to try this file repair software, download it and follow the instructions on how to use it. In the guide below, we've explained how to fix an Excel file.

Step 1: Download and run Fixo on your computer or laptop. Select "File Repair" to fix corrupted Office documents, including Word, Excel, PDF, and so on. Click "Add File" to select the damaged document.

Add the file to Fixo for document repair

Step 2. Click on “Repair All” to fix multiple files at once. To repair a single file, hover over the target file and select “Repair.” You can also preview the file by clicking on the eye icon.

Select the document to repair

Click “Save” to save the selected files. Choose “Save All” to save all repaired files. “View Repaired Files” locates the folder with your repairs.

Save the repaired document in Fixo

Bottom line

That's all there is to it for "Module compilation failed hidden". Hopefully, this has been helpful in resolving your issue. Once again, we highly recommend the file repair tool for any needs to fix Word, Excel, PPT, or PDF documents – it's a wise choice to make.