How do I fix a hidden module error problem with my Solver add-in

Mike Redmond 0 Reputation points
2025-08-08T20:22:38.3433333+00:00

How do I resolve this compile error in hidden module: SolverCode? Here is a copy of the error message:User's image

I have tried everything I know including uninstalling and reinstalling Excel.

Microsoft 365 and Office | Excel | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Dana 5 Reputation points
    2025-08-09T00:04:49.59+00:00

    Hi. A recent software update recently killed mine as well.

    File / Options / Trust Center / "Trust Center Settings..."

    ActiveX Settings -> click to enable "Eable all controls without restrictions...etc"

    Close Excel, and restart Excel.

    HTH :>)

    Dana

    1 person found this answer helpful.
    0 comments No comments

  2. Jay Tr 7,020 Reputation points Microsoft External Staff Moderator
    2025-08-08T20:49:57.62+00:00

    Hi @Mike Redmond,

    Good day to you! Welcome to Microsoft Q&A. 

    Based on your description, I would recommend trying the following steps: 

    1.  Uncheck the Missing References to Solve Compile Error in Hidden Module Excel 

    Missing references to the objects in the Excel workbook often trigger compile errors in Excel. However, you can easily overcome such situations by unchecking the missing references. Here’s how you can do so: 

    • Open Excel >> press the Alt+ F11 keys together to go into the file Visual Basic Editor. 
    • From the Tools menu, select the References 

    User's image

    • Scroll down to the Available References box and uncheck all that starts with MISSING: 
    • Finally, click OK. 

    User's image

    1. Unprotect the Code Module 
    • The very first method that you can try to troubleshoot this error is to remove the password from a protected module. If you can access the VBA code without any issue, unprotect the module by following the below steps: 
    • Open the protected workbook >> go to the File>> Options. 

    User's image

    • Next, click on the option “Customize Ribbon”. 
    • Under main tabs, find and tick on the Developer>> OK. 

    User's image

    • Click on the Developer & Visual Basic. 
    • Then, right-tap on the module that you need to unprotect >> select the VBAProject Properties option. 
    • Now, go to the Protection then confirm the password twice >> click OK and ensure to remove the tick from ‘Lock project for viewing’.  User's image
    • After completion of these steps, try to run a VBA code to see if the error is solved. 
    1. Remove Excel Add-ins  
    • As already mentioned in the causes section, incompatible add-ins in Excel can lead to compile errors. It is worth checking & disabling the mismatched add-ins to troubleshoot the Excel compile error in hidden module sheet1. For this, you have to follow the below instructions carefully: 
    • Open Run box by pressing Win + R keys >> type excel /safe >> hit OK. This will open the Excel in a safe mode. 

    User's image

    • Then, attempt to open the faulty Excel file. If the document opens without any error, then consider removing the newest installed add-ins. 
    • Go to the File tab >> click on Options >> Add-ins. 

    User's image

    • In Add-ins, you have to search & select the most recent add-ins, >> click Go. 

    User's image

    • Now, uncheck all the add-ins under Add-ins window >> click OK. 
    • At last, restart the Excel program to check if the problem is resolved. 

     

    Please try these fixes to see if the issue persists, if you have any further questions and concerns, please let me know. Looking forward to your response. 

     


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.     

    image

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.