How to Remove Macros From an Excel File

Do you want to remove the VBA Macros from a Microsoft Excel file.? In this guide, I will explain to you how to do that. Normally, these macros are used to automate several tasks that may be repeatedly required in an Excel file. In case you do not need the macros, you can remove them. Either you may remove the ones you do not require. Otherwise, you can also delete all the macros present in a file.

There are three ways to remove the macros from an Excel file. I have mentioned all three of them. You may remove the module that consists of the macros. Secondly, you can remove those macros that you do not need in a worksheet. Another easy process is to change the excel sheet file format so that it doesn’t support VBA macros anymore. That will automatically remove the macros from that file. Let’s check these methods out.

How to Remove Macros From an Excel File

Here is the solution to delete the Macros.

Delete the Module Consisting of Macros

You have to access the visual basic editor to remove the module you want.

  • Open Visual Basic Editor
  • Click on Developer > Visual Basic
  • Next, click on View in the menu bar
  • Now click on Project Explorer
  • You have to open the Module, Worksheet object, or ThisWorkbook depending upon where the macros will be
  • When the code opens, you can select all the macros and press Delete
  • Otherwise, if you need to specifically delete a macro, select that part only and hit the Delete button.

Alternatively, you can also right-click on a Module in the Project Explorer and from the menu select Remove Module to remove it.

Change the Excel File Name Extension to XLSX to Remove Macros

Macros are supported only on the following file formats of Excel.

  • .XLSM
  • .XLSB
  • .XLS

You have to change the file format to XLSX file format and that will remove all the active macros from that file.

  • Go to File > Save As
  • Then click on Browse
  • Browse for the file with XLSM, XLSB, or XLS extension
  • Then select that file
  • In the Save As Type click to expand the drop-down menu
  • From the list click on the option Excel Workbook (*.xlsx)
  • Click Save
  • A pop-up will appear mentioning that upon saving in XLSX format VB project features cannot be saved.
  • Since you need to have the Excel file without the macros, click Yes to continue

This method is useful if you need to remove all the macros from a file. In fact, I recommend this method as it is the easiest one to carry out.

Remove A Particular Macro

If you wish to remove only one particular macro or few macros, then you have to follow this method.

  • Under the Developer tab in Excel click on Macros [you can also open the Macro Dialog box by clicking View]
  • In the Macro dialog box, select This Workbook from the Description
  • From that workbook, select the Macro from the list of macros present
  • Select the Macro and click Delete on the right-hand panel
  • Repeat the steps if you want to delete other Macros as well.

So, that’s all the three ways to remove macros from a Microsoft Excel file. depending upon your requirement you can use any one of the three methods described here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.