How do I enable a macro in Excel when uploading the excel file to sharepopint

Andrew Creathorn 0 Reputation points
2023-06-21T18:20:10.2033333+00:00

I'm uploading an Excel spreadsheet that contains a Macros from my PC to a SharePoint site. The upload works fine but the marco is disabled when I try to open the file from from SharePoint (opening in desktop app not browser).

Get the message below. Help please!

User's image

Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office Excel For business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tanay Prasad 2,250 Reputation points
    2023-06-22T06:27:34.6133333+00:00

    Hi,

    The macros may be disabled by default due to security settings. This is to protect users from potentially harmful code.

    To enable macros in the uploaded spreadsheet, you can follow these steps:

    1. In the Security Warning dialog box, you are seeing a message stating that "Microsoft has blocked macros from running because the source of this file is untrusted." Click on the "Options..." button next to the message.
    2. In the Trust Center dialog box, select the "Enable all macros (not recommended; potentially dangerous code can run)" option.
    3. Click on the "OK" button to save the changes and close the dialog box.
    4. You should now see a yellow bar at the top of the worksheet indicating that macros are enabled. You can now use and run the macros in the Excel file.

    Best Regards.

    0 comments No comments

  2. Emi Zhang-MSFT 30,046 Reputation points Microsoft External Staff
    2023-06-22T09:31:37.1533333+00:00

    Hi @Andrew Creathorn,

    I suggest you follow this article and try the method to enable macro by deault:

    https://learn.microsoft.com/en-us/deployoffice/security/internet-macros-blocked

    Hope the information is helpful.


    If the response is helpful, please click "Accept Answer" and upvote it.

    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

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.