Compile error in a hidden module is an error message that may be shown for some Microsoft Word and Microsoft Excel users. This message is generally displayed when Office users open Word or Excel. After this message, the application does not launch.
Fix Compile error in hidden module in Excel or Word
This error occurs when the code is incompatible with the version or architecture of this application. For instance, if code in a document targets 32-bit Microsoft Office applications but it is attempting to run on 64-bit Office, then this error can occur.
The error is raised when a compilation error exists in the VBA code inside a protected (hidden) module. The specific compilation error is not exposed because the module is protected.
Try the following suggestions to fix the issue:
- Unprotect the VBA code module
- Re-registering OCX files with the Command Prompt
- Updating Adobe Acrobat
- Moving PDfmaker files to another folder
- Updating or Uninstalling the Norton Antivirus software
Let us look at these ways in more detail.
1] Unprotect the VBA code module
Now, if you are facing this error, do the following:
- If you have access to the VBA code in the document or project, unprotect the module, and then run the code again to view the specific error.
- If you don’t have access to the VBA code in the document, then contact the document author to have the code in the hidden module updated.
This is the official workaround. If that does not help, try the following suggestions:
2] Reregistering OCX files with the Command Prompt
The compile error in hidden module error could also be a side effect of Windows updates. Hence, registering a mscomctl.ocx file may fix the issue. To reregister the OCX file, follow the given steps:
Press Windows + X hotkey. Choose Command Prompt (Admin) to run the prompt as an administrator.
In the case of a 32-bit Windows computer, provide the following commands in the prompt:
regsvr32 -u c:windowssystem32mscomctl.ocx regsvr32 c:windowssystem32mscomctl.ocx
In the case of a 64-bit Windows computer, provide the following commands in the prompt:
regsvr32 -u c:windowssyswow64mscomctl.ocx regsvr32 c:windowssyswow64mscomctl.ocx
3] Updating Adobe Acrobat
This applies to you if you are using Adobe Acrobat.
The compile error in hidden module error could also occur due to two Adobe Acrobat template files in MS Office folders. It is advisable to install the Adobe software from an official website to avoid this error. In case you come across this error, you can export PDFs into other Microsoft 365 like Word, Excel, or PowerPoint. You can update Adobe by clicking on Help in Adobe’s window. Choose Check for Updates to open the updater window. You can then press the Download and Install button in case of any update.
4] Moving PDFmaker files to another folder
This applies to you if you are using PDFmaker
The compile error in hidden module error is connected to two Adobe Acrobat files i.e. PDFmaker.xla and PDFmaker.dot. Hence, moving these files out of the MS Office folders may also fix the error. You can also follow the below steps:
- Press Type here to search button and open Cortana’s search box. Type PDfmaker.xla in the search box to look for that file.
- Type PDFmaker.dot in the search box to look for the file. Right-click the said files and choose Open file location to open the folders in the File Explorer.
- In case you cannot find the files, you can open the MS Office Start-up and Xlstart folders in the File Explorer.
- Right-click on the files in the File Explorer and choose the Cut option to move the PDfmaker files to the desktop. Right-click another folder to move them and choose Paste.
5] Update or Uninstall the Norton Antivirus software
This applies to you if you are using Norton software
The Norton Antivirus may also be connected to compile error in hidden module error. If it is installed, updating the software can fix the issue. You can check for updates by pressing the Update Me Now button. You can right-click the Norton Antivirus system tray icon and choose Norton LiveUpdate.
In case a Norton Antivirus update does not fix the issue, you can uninstall the Norton software.
Press Windows + R shortcut to open the Run windows. Type appwiz.cpl in Run, and click on the OK button. Choose the listed Norton Antivirus software and click on the Uninstall button to remove the software after confirmation.
We hope that one of the above-mentioned solutions helps you fix the compile error in hidden module error and re-launch Word and Excel. Do let us know in case of any queries or suggestions.
How do I open Excel in safe mode?
You can open Excel in safe mode by pressing and holding the Ctrl button as you start the program. You can also use the safe switch (excel.exe/safe) when you start the program from the command line.
Fix: The file is corrupt and cannot be opened error in Word, Excel, PowerPoint
What is the safe mode in Microsoft Word?
When you cannot use Microsoft Office normally, you can use a built-in safety feature. If Word or Excel crashes every time you open it, you can start the said application in safe mode and it helps you work normally.