Excel macros no longer work after fixes applied

Anonymous
2023-01-05T11:16:55+00:00

Receive message within excel on opening excel workbook with macros

"Security risk Microsoft has blocked macros from running because the source of this file is untrusted."

File resides on my One drive, shared from another user.

  • I have added the OneDrive shared folder into the trusted centre trusted locations
  • I have enable VBA macros with Trust Center - Macros settings

Any other suggestions?

Hugh

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-06T03:12:29+00:00

    Hello Hugh Suter

    Welcome to the Microsoft community.

    Based on the current description, it appears that when you open an Excel file with a macro shared by others, you are prompted that the macro is locked.

    The macro may have been disabled because the workbook was opened from an untrusted location.

    To fix this, you can try the following:

    1. Close the workbook, and then open it again from a trusted location.
    2. If you are trying to run the macro in a shared workbook, you can ask the workbook owner to sign the macro with a digital certificate. This will allow you to trust the macro and run it smoothly.
    3. If you own the workbook and want to sign the macro, you can do the following:
    • In Excel, go to the Developer tab, and then click Visual Basic.
    • In Visual Basic Editor, on the Tools menu**, click Digital Certificate**.
    • Follow the on-screen instructions (Click here) to create a digital certificate, and then use it to sign the macro.
    1. If you own the workbook and do not want to sign the macro, you can change the macro security settings to allow all macros to run.
    • In Excel, go to File > Options > Trust Center > Trust Center Settings > Macro Settings.
    • Select "Enable all macros (not recommended; potentially unsafe code may be executed)", and then click OK.

    Be aware that enabling all macros can pose a security risk, because malicious macros can potentially be used to compromise your computer.

    Feel free to post if there are any updates.

    Chandy | Microsoft Community Support Specialist

    0 comments No comments
  2. Anonymous
    2023-01-09T08:37:44+00:00

    Hi Candy,

    Thank you for your suggestions.

    I have created a local digital signature and unblocked all macros and I still receive the same message and cannot run the VBA in the excel workbook.

    The excel workbook is owned by me, but I am accessing it via a shared folder on OneDrive, on a different PC logged in by a different person.

    Any further suggestions? Thank you,

    Hugh

    0 comments No comments
  3. Anonymous
    2023-01-09T09:47:39+00:00

    I have created a local digital signature and unblocked all macros and I still receive the same message and cannot run the VBA

    how did you create a local digital signature?

    have you installed the digital signature in windows system properly?

    It need install in Your PC and sign vba as well.

    0 comments No comments
  4. Anonymous
    2023-02-22T09:46:09+00:00

    Hello Hugh Suter

    Sorry for my late reply.

    Questions about the use of macro files may be better asked in the following community, which is designed to maintain advanced users like you, and the following is an entry point.

    Excel - Microsoft Q&A

    0 comments No comments