Share via

macros dont open r calculate on some machines but do on others

Jay Winestein 0 Reputation points
2026-04-05T14:14:17.5733333+00:00

i need help willing to pay to solve this issue of macros not working on a machine but does on another

Microsoft 365 and Office | Excel | Other | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Kal-D 7,365 Reputation points Microsoft External Staff Moderator
    2026-04-05T21:37:31.7266667+00:00

    Hi Jay Winestein,

    Since the workbook runs as expected on another machine, this does suggest the issue is likely related to settings or environment on the affected PC, rather than the macro logic itself.

    On the machine where it doesn’t work, a few gentle checks that may help narrow things down:

    • Just confirm the file is still saved as .xlsm or .xlsb, and that macros are enabled when you open it.
    • Try saving a fresh copy to a local folder (like Desktop or Documents) and reopening it. If the file came from email, OneDrive, or a network location, Windows/Excel can sometimes treat it as untrusted.
    • It may also help to briefly compare Trust Center macro and ActiveX settings with the machine where it works.
    • Opening Excel in Safe Mode (excel /safe) can be a quick way to see whether an add‑in or startup item is getting in the way.
    • If this is a work‑managed device, keep in mind that security policies (including legacy/XLM macro restrictions) can differ between machines and override local settings.

    If you’re seeing an error, noting whether it’s a compile error or run‑time behavior, and whether the file uses ActiveX or API/Declare code, can help point things in the right direction.

    Please let me know if this proves useful to you, or if you would like further assistance.

    I'm looking forward to your reply.


    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.

    Was this answer helpful?


  2. Q&A Assist
    2026-04-05T14:14:34.8566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Macro-enabled workbooks can behave differently across machines because of security settings, policies, or how the file is saved. Use the following checks on a machine where macros do not run but do work elsewhere:

    1. Confirm the workbook is macro-enabled
    • Ensure the file is saved as an Excel Macro-Enabled Workbook (*.xlsm). If it is saved as a macro-free format (such as *.xlsx), macro sheet functions and VBA will not run.
    • If prompted with “The following features cannot be saved in macro-free workbooks,” choose “No” and save as *.xlsm.
    1. Enable macros when opening the file
    • When opening the workbook, look for the security warning bar and select “Enable Content” so macros can run. If macros remain disabled, the host application is blocking them.
    • For documents opened with macros disabled, follow the guidance in “Enable or disable macros in Office files (2007, 2010, and 2013)” to adjust macro settings so the document opens with macros enabled.
    1. Check Excel macro security and ActiveX settings
    • On the problem machine, verify that macro security is not set to “Disable all macros without notification.”
    • If the workbook uses ActiveX controls, ensure ActiveX and macro content are allowed. In one reported case, changing ActiveX settings and enabling macro content resolved runtime errors and allowed the sheet to work properly.
    1. Compare Excel 4.0 (XLM) macro policies between machines
    • If the workbook or add-ins (such as Solver or Analysis ToolPak) rely on Excel 4.0 (XLM) macros, a security policy may be blocking them on some machines.
    • XLM macros can be disabled by:
      • Group Policy: User Configuration > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security > Trust Center > Prevent Excel from running XLM macros.
      • Registry: setting HKCU\SOFTWARE\Microsoft\Office\16.0\Excel\Security\XL4MacroOff to 1.
    • If these are enabled on one machine and not on another, macros or add-ins may fail only on the locked-down machine.
    • As a workaround for Solver/Analysis ToolPak scenarios, in GPEdit go to User Configuration > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security > Trust Center > Macro Notification Settings and uncheck “Enable Excel 4.0 macros when VBA macros are enabled.”
    1. Check for managed/enterprise policies
    • In a managed environment, group policies may override local macro settings. If macros work on a personal device but not on a corporate device, IT may have disabled certain macro types or blocked untrusted documents.
    • Coordinate with the IT department before changing registry keys or group policies, as they may intentionally restrict macros.
    1. Verify that macros are actually present and accessible
    • If a worksheet is copied into a new workbook, macros may still reside in the original workbook or a different module. In that case, the new workbook can show “Cannot run the macro… The macro may not be available in this workbook or all macros may be disabled.”
    • Confirm that the macro code exists in the workbook that is being opened on the problem machine and that the assigned macro name matches.
    1. If macros still do not run
    • Compare:
      • Excel version and update level on both machines.
      • Trust Center macro settings and ActiveX settings.
      • Any registry or group policy settings related to macros.
    • If the issue persists even after aligning these settings, reinstalling Office or, in rare cases, reinstalling Windows has resolved unexplained macro and calculation issues for some users.

    References:

    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.