Can't use macros in excel

Daniel Ding 0 Reputation points
2023-06-26T05:55:18.48+00:00

Get error while run macrosUser's image

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,356 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Khaled Elsayed Mohamed 1,260 Reputation points
    2023-07-06T10:03:06.91+00:00

    Hi DD

    If you are unable to use macros in Excel and encounter errors while running them in Office 365, there are a few possible reasons and solutions you can try:

    1. Macro Settings: Office 365 has security settings that control the execution of macros. By default, macros are disabled or restricted for security reasons. To enable macros, follow these steps:
      • Open Excel and go to "File" > "Options."
      • In the Excel Options dialog, select "Trust Center" from the left navigation pane.
      • Click on "Trust Center Settings" button.
      • In the Trust Center dialog, select "Macro Settings."
      • Choose the option "Enable all macros" or "Enable all macros with notification" if you want to be prompted before running macros.
      • Click "OK" to save the changes.
    2. Enable Content: If your Excel workbook contains macros and you see a security warning at the top of the worksheet, you need to enable content to allow the macros to run. Click on the "Enable Content" button to enable macros for that particular workbook.
    3. Trusted Locations: Ensure that the location where your Excel workbook containing macros is stored is added to the trusted locations in Excel. Follow these steps to add a trusted location:
      • Go to "File" > "Options" > "Trust Center" > "Trust Center Settings."
      • In the Trust Center dialog, select "Trusted Locations" from the left navigation pane.
      • Click on "Add new location" and browse to the folder where your workbook is saved.
      • Click "OK" to save the changes.
    4. Digital Signature: If your macro-enabled workbook is digitally signed, it provides an extra level of security and allows macros to run without additional warnings or prompts. Consider digitally signing your macros if you haven't already done so.
    5. Macro Code Errors: Check the macro code for any errors. Syntax errors, missing references, or logical mistakes can cause macros to fail. Use the VBA editor in Excel to debug and correct any errors in your macro code.
    6. Office 365 Plan Limitations: Note that certain Office 365 plans, such as the Office 365 Business Essentials plan, do not include support for running macros in Excel. Verify that your Office 365 plan includes the necessary features to run macros.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments