How to Remove Macros from Excel (5 Suitable Ways)

Removing VBA Macros is easier if you know the right methods. In this article, I’ll show you how 5 suitable ways to remove Macros from a file in Excel. You’ll learn both to delete the Macros one by one and to eradicate all the Macros together from our Excel worksheets. Before jumping into the methods in the next section, take a look at the overview of this article.

remove macros from excel

Here we’ve got an Excel workbook with 5 Macros, namely Macro_1, Macro_2, Macro_3, Macro_4, and Macro_5 respectively. Today our objective is to remove the Macros from this workbook.


1. Selecting and Removing Macros from the Macro Dialogue Box in Excel

You can remove the Macros from your workbook by selecting them from the dialogue box called Macro.

⧭ Step 1: Opening the Macros Dialogue Box

➤ Go to the Macros tool under the section called Code from the Developer tab in your Excel Toolbar.

➤ Click on Macros.

Opening the Macros Box to Remove Macros from Excel

⧪ Note: The Developer tab is by default a hidden tab in Excel. So click here to see how to open the Developer tab if you don’t find it.

⧭ Step 2: Deleting the Desired Macro

➤ A dialogue box called Macro will open.

➤ Select the Macro you want to delete, and then click on Delete from the right panel.

Here, I am going to delete Macro_5.

Select and Remove Macros from Macro Dialogue Box in Excel

You’ll find your desired Macro deleted from your workbook.

Things to Remember:

  • This is the most useful method to remove the Macros, as you needn’t remove all the Macros in this method.
  • You can remove the Macros that you don’t want, and keep the rest that you need. So it’s quite handy.

Read More: Excel VBA to Pause and Resume Macro


2. Using Shortcut Key to Delete Macros from the Macro Dialogue Box in Excel

There is also a shortcut key to remove the Macros from the Macro dialogue box.

⧭ Step 1: Pressing Shortcut Key to Open the Macro Dialogue Box

➤ Press ALT+F8 on your keyboard.

➤ The Macro Dialogue box will open.

⧭ Step 2: Deleting the Desired Macro

➤ Then follow the step mentioned in Method 1.

➤ Select the Macro you want to delete, and then click on Delete from the right panel.

Here, I am again going to delete Macro_5.

Select and Remove Macros from Macro Dialogue Box in Excel

You’ll find the selected Macro deleted from your workbook.

Things to Remember:

  • This is also one of the easiest methods to delete your desired Macro.
  • But you must remain in any of your worksheets while pressing the shortcut key. Otherwise, it won’t work.

Read More: How to Record a Macro in Excel


3. Selecting and Erasing Macros from Excel Modules

You can use this method if the Macros are created by inserting Modules in your workbook.

⧭ Step 1: Opening the VBA Window

➤ Go to the Visual Basic tool under the section Code from the Developer tab in your Excel Toolbar.

➤ Click on Visual Basic.

Opening the Module Box to Remove Macros from Excel

⧭ Step 2: Selecting the Module with the Macro

➤ The VBA window will open.

➤ Select the Module that contains the Macro you want to delete from the right scroll bar under the section Modules.

Here I’ve selected Module 5.

Selecting Module to Remove Macros from Excel

⧭ Step 3: Removing the Module by Right-Click

➤ After selecting the desired module, right-click on your mouse.

➤ From the options available, click on Remove Module.

Context Menu

⧭ Step 4: Checking the Warning Box

➤ You’ll find a warning box asking you whether you want to export the module before removing it or not.

➤ Click on No.

Warning Box

You’ll find the selected module removed from the workbook.

Things to Remember:

  • This method is also useful, but the only limitation is that the selected module will be deleted permanently in this method.
  • That means, if you delete Module5, it will be deleted permanently. Later on, If you open a new module, it will be named Module6, not Module5.
  • In order to avoid this issue, select Yes in step 4. Then you’ll be asked to save a Basic file (*.bas) similar to the name of the module (Module5 here). Save it.

Saving a Basic File to Remove Macros from Excel


4. Removing Macros from Excel Modules with Shortcut Keys 

There is also a shortcut key to open the VBA window and delete the desired modules.

Press ALT+F11 on your keyboard. The VBA window will open.

Applying Shortcut key

Then follow the steps described in Method 3. Select your desired module, right-click it, and then remove the module.

The desired module will be removed from your workbook.


5. Deleting All the Macros Together by Saving the Excel File with .xlsx Extension

If you want to delete all the Macros together, use this method.

⧭ Step 1: Opening the File Tab

➤ Click on the File tab on the rightmost side of the Excel Toolbar.

Clicking File Tab to Remove Macros from Excel

⧭ Step 2: Saving the Workbook as Excel Workbook

➤ Save the Workbook as Excel Workbook instead of Excel Macro-Enabled Workbook.

Saving Process

  • You’ll find all the Macros removed automatically from your workbook.

Download Practice Workbook


Conclusion

Using these methods, you can remove the Macros from your workbook, either one by one or by all the Macros together. Do you have any questions?


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Rifat Hassan
Rifat Hassan

Rifat Hassan, BSc, Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, has worked with the ExcelDemy project for almost 2 years. Within these 2 years, he has written over 250 articles. He has also conducted a few Boot Camp sessions on effective coding, especially Visual Basic for Applications (VBA). Currently, he is working as a Software Developer to develop and deploy additional add-ins to enhance the customers with a more sophisticated experience with Microsoft Office Suits,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo