- On Windows |
- On Mac |
- FAQ |
- Tips |
- Warnings
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher.
The wikiHow Tech Team also followed the article's instructions and verified that they work.
This article has been viewed 329,098 times.
Learn more...
This wikiHow guide teaches you how to remove a macro from a Microsoft Excel spreadsheet. Removing a macro is as simple as opening the macros menu in the "View" tab and deleting the ones you don't want, though you'll have to enable macros in your document before you can do this.
Quick Guide: Removing Macros in Excel
Click the "View" tab, click the "Macros" icon, and then click "View Macros". Select the macro you want to remove and click "Delete".
For popular FAQs on deleting macros in Excel, jump to more common questions.
Steps
-
Open the macro-enabled Excel sheet. Double-click the Excel file which contains the macro you want to delete. This will open the file in Excel.
-
Click Enable Content. It's in the yellow bar at the top of the Excel window. This will enable the macro(s) that are embedded in the file.
- If you don't enable the macro(s), you won't be able to delete your macro.
Advertisement -
Click the View tab. This tab is in the green ribbon at the top of the Excel window.
-
Click View Macros. This option is in the drop-down menu. Doing so opens the Macros pop-up window.
-
Click the "Macros in" drop-down box. You'll find this at the bottom of the window. Clicking it prompts a drop-down menu.
-
Click All Open Workbooks. It's in the drop-down menu.
-
Select a macro. Click the name of the macro you want to delete.
-
Click Delete. It's on the right side of the window.
-
Click Yes when prompted. Doing so will remove the macro from your workbook.
-
Save your changes. Press Ctrl+S to do so. This will ensure that the macro remains deleted after you close Excel.
-
Open the macro-enabled Excel sheet. Double-click the Excel file which contains the macro you want to delete. This will open the file in Excel.
-
Click Enable Content. It's in the yellow bar at the top of the Excel window. This will enable the macro(s) that are embedded in the file.
- If you don't enable the macro(s), you won't be able to delete your macro.
-
Click Tools. It's a menu item at the top of your Mac's screen. Clicking it prompts a drop-down menu.
-
Select Macro. This option is at the bottom of the Tools drop-down menu. Selecting it causes a pop-out menu to the right of the drop-down menu to appear.
-
Click Macros…. It's in the pop-out menu. Doing so opens the "Macros" window.[1]
-
Click the "Macros in" drop-down box. This is near the bottom of the "Macros" window. A drop-down menu will appear.
-
Click All Open Workbooks. It's in the drop-down menu.
-
Select a macro. Click the name of the macro you want to delete.
-
Click —. It's below the list of macros.
-
Click Yes when prompted. This will remove the macro.
-
Save your changes. Press ⌘ Command+S to do so. This will ensure that the macro remains deleted after you close Excel.
Common Questions: Excel Macros
Can I fully disable macros in Excel?
Go to the File tab and select Options > Trust Center > Trust Center Settings > Macro Settings. In this menu you can choose to disable all macros with notification or without notification. You can also decide to allow macros that are digitally signed, but disable all others.
How do I undo a macro in Excel?
If you run a macro that ends up doing something you want to undo, the only way to get your previous work back is to close the document without saving. If you've saved after you ran the macro, you won't be able to undo the changes due to the way that macros (and VBA code) work.
Why can't I delete an Excel macro?
While in Excel, press Alt + F11 to open the Visual Basic Editor. In the Project Explorer (top-left pane) look for "VBAProject," then look for modules containing macros. If you don't see any macros there, the macros you're using may be controlled by an add-in that can be edited in File > Options > Add-ins.
Tips
-
On a Mac, you can also open the "Macros" window from within the Developer tab by clicking Macros.Thanks
Warnings
- Macros can harm your computer. Unless you know where a macro came from (e.g., a trusted colleague created it), do not run macros from files you didn't personally create.Thanks
References
About This Article
1. Open the file.
2. Click Enable Content.
3. Click View.
4. Click the Macros drop-down.
5. Click View Macros and select "This Workbook."
6. Click All Open Workbooks.
7. Select a macro and click Delete.
8. Click Yes.