How to enable macros in excel

How to enable macros in excel .I have for years stored an Excel spreadsheet in OneNote. This spreadsheet has VBA code/Macros that worked fine. About 2 months ago I started getting a “Security Risk” error message stating that the macros have been blocked from running. Any idea what I need to do to be allowed to run macros again? I’m using a PC based Office package, not Microsoft 365.

Solution: Enabling Macros on Workbooks from OneDrive

Pro Tip

Hey all,

I haven’t been able to enable macros on any of the files I have stored in OneDrive for quite some time now: MOTW wasn’t popping up, adding OneDrive’s URL wasn’t working – literally nothing was working. I searched everywhere trying to find a solution, and only yesterday did I find a solution that both works and makes sense.

This post is being made in the hopes that it will save some other people time that are still looking for a fix, or will be looking for a fix in the future.

  1. Open Excel

  2. Navigate to Trust Center Settings

    1. Developer > Macro Security OR

    2. File > Options > Trust Center > Trust Center Settings

  3. Go to Trusted Locations

  4. Click “add new location” and put in the text box that pops up.

    1. Be sure to click the checkbox “Subfolders of this location are also trusted”

  5. Click Ok and restart excel.

Note, this will trust all macros of all files in your OneDrive, so I recommend taking the appropriate security steps to ensure you’re only saving files in OneDrive (that you want to open in app, at least) that you trust.

Hope this helps!

To enable macros in an Excel spreadsheet stored in OneNote, follow these steps:
1) Open the Excel spreadsheet in OneNote
2) Click on “File” and then “Options”
3) In the “Excel Options” dialog box, select “Trust Center”
4) Click on the “Trust Center Settings” button
5) In the “Trust Center” dialog box, select “Macro Settings”
6) Select the “Enable all macros” option, then click OK
7) Close the “Excel Options” and “Trust Center” dialog boxes
8) Save the Excel spreadsheet
Note that enabling macros can be a security risk, as malicious macros can potentially harm your computer. Only enable macros from trusted sources.
If you have any other questions or need assistance with anything, please don’t hesitate to let me know. I’m here to help to the best of my ability.
Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below.
Best Regards,
I am truly sorry to hear about this issue. 
Macros from the internet will be blocked by default in Office. Please try unblocking macros. To remove block, right-click on the file, choose Properties, and then select the Unblock checkbox on the General tab.
In the case that won’t work please check this link for more information, there is a table for steps that you can follow:
HOWEVER, if it all fails to resolve it. There is a workaround:
Workaround the problem by saving the file as an .xlsx file and creating macros on each user’s personal macro file on their PCs.  Not an ideal solution but it works.
Step 1: Open Excel sheet → file → information→ Open File Location, find the cache location of this Excel table
Step 2: In the cache position, right-click the Excel table → properties → check “Unlock Lock”
Note: The above two steps must be completed in the “Protected View” state, and then click “Enable Editing” after completing the above two steps.

Sponsored Links: