macro file not working in 365

2026-09-10T12:14:07.1166667+00:00

I am facing an issue with an Excel file that contains a Validate button. Earlier, when I clicked the Validate button, it used to display the message "Validation Successful". However, now nothing happens when I click the button.

I have already checked and changed the Macro Settings in File → Options → Trust Center → Trust Center Settings → Macro Settings, and macros are enabled. Despite this, the button is still not working and no message is displayed.

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Killian N 3,820 Reputation points Independent Advisor
    2026-09-10T12:48:18.5366667+00:00

    Good day PREM KUMAR,

    Hope things are going smoothly for you. I understand this issue may be causing inconvenience, and I appreciate your patience.

    Please try the following:

    1. Make sure the workbook is saved as an Excel Macro-Enabled Workbook (.xlsm) or Excel Binary Workbook (.xlsb). If it was saved as an .xlsx file, the macro may have been removed.
    2. Close Excel, right-click the file, select Properties, and check Unblock if this option is available. Then click Apply > OK and reopen the file.
    3. When opening the workbook, select Enable Content if a security warning appears. Message Bar with ActiveX warning message
    4. Go to File > Options > Trust Center > Trust Center Settings > ActiveX Settings, and select Prompt me before enabling all controls with minimal restrictions. The button may be an ActiveX control, which is managed separately from VBA macro settings. Screenshot that shows the ActiveX Settings area.
    5. Open the Developer tab and ensure that Design Mode is turned off.
    6. Press Alt + F8 and try running the validation macro directly.

    For more information, please refer to the following link:

    You can also press Alt + F8 and try running the validation macro directly. If it works from the Macro window but not from the button, the issue is likely with the button assignment or ActiveX control. If the macro also fails there, press Alt + F11, run it again, and note any error message or highlighted code.

    If the macro runs through Alt + F8 but the button still does not work, the button may no longer be linked to the correct macro. Please right-click the button and check Assign Macro or View Code, depending on the type of button.

    If this is a company-managed computer, your organization’s security policy may override the Trust Center settings. In that case, please contact your IT administrator.

    Wishing you a quick resolution. Feel free to let me know if there are any updates.

    Best regards,

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-10T12:14:30.4266667+00:00

    If macros are already enabled and the Validate button still does nothing, check these Excel-specific causes:

    1. Confirm the workbook is trusted
      • Reopen the file and look for a security warning.
      • If Excel shows Enable Content, select it.
      • In the Security Warning dialog, select Yes to make the document trusted.
      • A file can still be blocked even when macro settings allow notifications.
    2. Use a trusted location
      • In Excel, go to File > Options > Trust Center > Trust Center Settings.
      • Select Trusted Locations and add the folder that contains the workbook.
      • Then reopen the file from that folder.
      • This is useful when the file came from email, network storage, OneDrive, or SharePoint and is treated as untrusted.
    3. Check whether the file is blocked because it came from the internet
      • In File Explorer, right-click the workbook and select Properties.
      • On the General tab, look for Unblock and select it if available.
      • Apply the change, then reopen the workbook.
    4. If the button runs VBA that accesses the VBA project, enable trusted access
      • Go to Developer > Macro Security.
      • Under Developer Macro Settings, select Trust access to the VBA project object model.
      • This is required when the macro uses the VBE object or manipulates VBA code. By default, that access is denied.
    5. Check whether Excel 4.0 macro policy is interfering
      • If the workbook depends on older Excel 4.0 (XLM) macro behavior, some functionality can stop working when a security policy prevents Excel from running XLM macros.
      • This is known to affect some add-ins and macro-related functionality.
      • In Excel macro settings, there is also an option for Enable Excel 4.0 macros when VBA macros are enabled.
      • If the device is managed by an organization, a policy can override local settings.
    6. Consider a macro error in the workbook code
      • If clicking Validate triggers a macro error, Excel may fail because:
        • the macro references an invalid object,
        • the method is being used in the wrong context,
        • there is an external read/write failure,
        • or security settings block the required VBA method/property.
    7. If the PC is managed by work or school, check for policy enforcement
      • Macro settings in Trust Center can be prevented from changing by an administrator.
      • In that case, local changes may not take effect even though the UI shows the setting.

    Because the button previously showed Validation Successful and now does nothing, the most likely checks are:

    • trust the document with Enable Content,
    • move it to a Trusted Location,
    • use Unblock in file properties if available,
    • and verify no organization policy is blocking VBA or Excel 4.0 macros.

    Warning: Avoid leaving Enable all macros turned on permanently. Microsoft marks this setting as not recommended because potentially dangerous code can run.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.