Share via

why my megastat isn'tworking despite anything

Mutendere Mbewe 0 Reputation points
2026-02-12T18:41:12.8866667+00:00

my megastat is not working after trying everything, i've tried to enable macros, trust locations, remove protection but its still showing a compile error

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

2 answers

Sort by: Most helpful
  1. Jay Tr 9,730 Reputation points Microsoft External Staff Moderator
    2026-02-12T21:24:41.46+00:00

    Hi @Mutendere Mbewe

    Thank you for posting your question to the Microsoft Q&A forum, and I'm sorry you are running into this. I know how concerning it is after you have already tried enabling macros, trusted locations, and removing protection. 

    A VBA compile error can come from a few different places, such as add in or VBA version compatibility, missing references, or differences between 32 bit and 64 bit Excel, so the next step is to pinpoint the exact failure. 

    Could you please share: 

    1. The full compile error message text (or a screenshot) and the module name if it mentions one. 
    2. The Excel file that contains the VBA script (or export the VBA modules and send them if the workbook data is sensitive). 

    This will help us better understand the context and provide more targeted support. Any additional information will help us better understand and support you.      

    If the above information contains any of your Personally Identifiable Information (PII), please send them in the private message session that I have initiated. Please follow these steps: 

    1. In your thread, you will see a banner regarding to ongoing private message.   

    User's image

    1. Click View messages.   

    Thank you for your patience and cooperation. I'm looking forward to your reply.


  2. Q&A Assist
    2026-02-12T18:41:24.3933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The issue you are experiencing with MegaStat showing a compile error could be due to several reasons related to the VBA code used in the application. Here are some possible causes and solutions:

    1. Protected Module: If the compile error is occurring in a protected module, the specific error may not be displayed. You would need to unprotect the module to view the error. If you don't have access to the VBA code, you may need to contact the document author to have the code updated.
    2. Compatibility Issues: If the code is incompatible with the version or architecture of your Office application (for example, if the code is designed for a 32-bit version but you are using a 64-bit version), this could lead to compile errors. Ensure that the code is compatible with your version of Office.
    3. Unexpected Compile Error: Sometimes, an unexpected compile error can occur due to unanticipated issues during compilation. In such cases, reviewing the specific line of code that is causing the error can help identify the problem.
    4. Macro Size: If the macro is too large, it may also cause compile errors. This is particularly relevant if the macro was created in a 64-bit version of Office and is being run in a 32-bit version. Consider breaking down the macro into smaller procedures if this is the case.

    If you have already tried enabling macros and setting trusted locations without success, you may want to check the compatibility of the VBA code and ensure that it is not in a protected module.


    References:

    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.