Emmanuel Seriki November 2, 20210 Comments 3 min read
How to Delete Macro

4 Easy Ways of Removing or Disabling Macros in Excel and Office Files

November 2, 2021

Macros in Excel and other Microsoft Office applications are incredibly useful when you need to automate a repeated task. But sometimes, you are better off disabling them. In this article, we will walk you through procedures used to remove macros in Excel, PowerPoint, and Word documents.

Why Should I Disable Macros?

  1. Disable macros for security reasons

Macros are essentially VBA code. A malicious macro can perform tasks without having to get permission from you. For this reason, macros constitute a serious security risk, and they are disabled by default Excel and other Microsoft office applications.

A malicious macro can delete files from your computer, corrupt your hard drive, and tamper with programs’ installations.

  • Ideally, you should only use macros that you recorded or created on your own. And we advise you to create macros only if you know exactly what you are doing.
  • If you must use macros created by others, the macros must come from trusted sources. You may want to review the constituents (the VBA codes) of such macros to confirm that they do not contain malicious code.
  1. Disable macros because you don’t use them

If you no longer use a macro, you can disable it or get rid of it for good.

How Do I Disable Macros?

Depending on whether you want to remove all the macros in a worksheet or a single macro, you have to choose a method of disabling macros that suits your needs.

How to Disable All Macros in Excel or Office Documents

If you need to remove all the macros in an Excel, PowerPoint, or Word document, you can use Aspose Macro Remover. In fact, the procedure involving this tool is the simplest and most straightforward method of deleting all macros.  

This is what you have to do:

  1. Go to Aspose Macro Remover page at https://products.aspose.app/slides/remove-macros
  1. Click Drop or upload your file.
  2. Select the file containing the macro you want to remove.
  3. Click REMOVE MACRO.

The tool will return your file without macros.

  1. Click DOWNLOAD NOW.

Your computer should get the file now. And that’s it. Your file is now free of macros.

Another Method of Removing All Macros

You can remove all the macros in an Excel workbook by saving the file to a format in which macros are nonexistent. For example, workbooks containing macros are typically in XLSM, XLSB, and XLS formats. So, when you save the workbooks to another Excel format like XLSX (which lacks support for macros), the macros get deleted automatically.

For example, if you have an Excel workbook containing macros, this is how you save that workbook in another Excel format to get rid of macros:

  1. Open the Workbook in Microsoft Excel.
  2. Click File (at the top-right corner).
  1. From the list of options on the left pane, click Save As.
  2. Click Browse.
  3. Navigate to the folder to which you want to save your Excel workbook without macros.
  4. Type in your preferred name for the Excel file.
  5. Click the drop-down menu for Save as type: to see the available formats.
  1. Select Excel Workbook (*.xlsx).
  2. Click Save.
  3. Once the Microsoft Excel dialog comes up to inform you of what you are about to do, click Yes to continue.

Microsoft Excel should now save the file based on the parameters you chose. You can go to the specified folder and check out the macro-free file now.

How to Remove Specific Macros From an Excel Workbook

If you no longer use a specific macro, you will do well to disable or remove it. The Developer tab in Excel is the place where you get to manage macros.

These are the instructions you must follow to remove a macro from a workbook:

  1. Open the Excel Workbook containing the macro you want to remove.
  2. Click the Developer tab (to go there).
  1. Click Macros.
  2. On the Macro dialog or window, click the drop-down menu for Macros in: and then select This Workbook.
  • Otherwise, if you want to delete a macro from another workbook, click All Open Workbooks.
  1. Now, under Macro name:, click the macro you want to delete (to get it highlighted).
  2. Click the Delete button.

Microsoft Excel will now get rid of the chosen macro.

If you want to delete other macros, all you have to do is repeat steps 5-6.

Another Method of Removing Specific Macros

The macro removal method we just described is quite popular, but it can only be used to remove macros stored in modules in the Visual Basic Editor. When it comes to event macros, if you decide to remove such a macro, you will struggle to remove it through the method above.

We intend to show you how to remove macros through the Visual Basic Editor. Go through these steps:

  1. Open the Excel Workbook with the macro you want to remove.
  2. Click the Developer tab (to go there).
  1. Click Visual Basic.
  2. Go through the workbook objects under Project Explorer. If you don’t see Project Explorer, click View and then click Project Explorer.
  3. Under Project Explorer, double-click the object containing the macro code. The object can be any of these things: a module, a worksheet object, or a ThisWorkbook.
  4. On the code window, delete the macro you want to remove.
  5. Save the changes.

At this point, we believe you have acquired all the knowledge you need to disable or remove macros.

Posted inAspose.Cells App Product Family, Aspose.Slides App Product Family, Aspose.Words App Product FamilyTags:
 

Related Articles

Categories