How to fix compile error in hidden module Thisworkbook on Office pro 2021 LTSC ?

Frtim Timos 0 Reputation points
2023-08-03T15:30:58.6633333+00:00

The code is not compatible to architecture version of this application
Excel 2021 x64
Excel 2016 workaround don't work, there is no file .ocx to register

User's image

Thanks for your help

FTI

Microsoft 365 and Office Install, redeem, activate For business Windows
Microsoft 365 and Office Excel For business Windows
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. AllenXu-MSFT 24,941 Reputation points Moderator
    2023-08-04T06:17:45.76+00:00

    Hi @Frtim Timos,

    To fix the "compile error in hidden module" in Excel, you can try the following solutions:

    1. Check if the VBA code in the document is compatible with the architecture of your Office version. If the code targets 32-bit Office applications but you are running a 64-bit Office version, it can cause this error. In this case, you can try running the code on a compatible version of Office.
    2. If you have access to the VBA code in the document, unprotect the module, and then run the code again to view the specific error.
    3. 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.

    References:


    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.

    0 comments No comments

  2. Frtim Timos 0 Reputation points
    2023-08-04T08:42:04.7033333+00:00

    Hello AllenXu-MSFT,

    Dot one, it works fine with Office Excel 2016 x64 versionI even tried the workarounds for this version (mscomctl.ocx). I would just like to know if there was any for this 2021 version before declaring to users that the form was no longer compatible.

    The dot two is ok.
    The dot three if not necessary, but we don't know the author

    Thanks

    0 comments No comments

  3. Tanay Prasad 2,250 Reputation points
    2023-08-07T06:10:06.5466667+00:00

    Hi,

    Here are some methods to troubleshoot the issue-

    1. Make sure Excel 2021 (x64) is compatible with the VBA code you're using. Older VBA code may occasionally make use of libraries or functions that are no longer supported by more recent iterations. Check the code to make sure it works with Excel 2021.
    2. Open the VBA Editor and select "Tools" > "References." Search for any references that aren't there and are either marked as "MISSING" or have different version numbers. If you do, uncheck them, click "OK," and then try checking them again.
    3. Third-party add-ins may occasionally clash with VBA code. To see if the problem still exists, try disabling or uninstalling any third-party add-ins.

    Here is also an article for your reference on how to fix the compile error in hidden module.

    Best Regards.

    0 comments No comments

  4. Frtim Timos 0 Reputation points
    2023-08-24T15:04:12+00:00

    Hi,

    We don't check the code to make sure it works with Excel 2021. There is a password

    I have no solution, the author leave the company.
    We drop the form.

    Thanks all for help

    0 comments No comments

Your answer

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