Microsoft’s Office suite is one of the most popular software. However, sheer popularity doesn’t make it perfect, and the programs still suffer from the occasional bugs and glitches.
In this article, we’re looking at the “compile error in hidden module” error in Excel.
Also read: Arrow keys not working in Excel: 3 Fixes
Why does this happen?
Since the error is in a protected module, it can’t be displayed. The error commonly occurs when a piece of code is incompatible with the version or architecture of the application you’re trying to use.
How to fix this?
Here are a few solutions you can try out.
Unprotect the VBA code module
If you’re facing this error and have access to the VBA code module, unprotect the module and run the code again to see the actual error. You can contact the document author to have the hidden VBA code updated if you don’t have access to the VBA code module. From there on, the solution depends on the code that you’re running.
Reregister OCX files using Command Prompt
The compile error can also be a side-effect of Windows updates. Try registering the mscomctl.ocx file to see if that solves your problem.
You have to open up the Command Prompt and type the following commands one at a time.
For 32-bit Windows:
regsvr32 -u c:\windows\system32\mscomctl.ocx regsvr32 c:\windows\system32\mscomctl.ocx
For 64-bit Windows:
regsvr32 -u c:\windows\system64\mscomctl.ocx regsvr32 c:\windows\system64\mscomctl.ocx
Update Adobe Acrobat
The error can also be triggered by two Adobe Acrobat template files located in MS Office folders. Try and see if there are any updates available for Acrobat and if there are, install them right away and restart your computer. This should fix the error.
Move PDFMaker files to another folder
If you’re using PDFmaker, the two connected Acrobat files PDFmaker.xla and PDFmaket.dot can cause these problems. Follow these steps to move these files to another folder.
Step 1: Open Windows Explorer and search for the pdfmaker files. You can use the following search term.
Step 2: Move these files to any other folder on your PC.
Now try restarting Excel and see if it works.
Also read: Stuck at ‘Updating Office, please wait a moment’? Here are 11 fixes