- On Windows |
- On Mac |
- Q&A |
- 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 290,177 times.
Learn more...
This wikiHow teaches you how to remove a macro from a Microsoft Excel spreadsheet. You can do this from within the spreadsheet's settings in Excel on both Windows and Mac computers.
Things You Should Know
- You must first enable macros in your workbook before you can delete them.
- On Windows, click "Macros" on the "View" tab to view and delete macros.
- On a Mac, you'll find your macros in the "Tools" menu under "Macros.
Steps
On Windows
-
1Open 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.
-
2Click 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 -
3Click the View tab. This tab is in the green ribbon at the top of the Excel window.
-
4
-
5Click View Macros. This option is in the drop-down menu. Doing so opens the Macros pop-up window.
-
6Click the "Macros in" drop-down box. You'll find this at the bottom of the window. Clicking it prompts a drop-down menu.
-
7Click All Open Workbooks. It's in the drop-down menu.
-
8Select a macro. Click the name of the macro you want to delete.
-
9Click Delete. It's on the right side of the window.
-
10Click Yes when prompted. Doing so will remove the macro from your workbook.
-
11Save your changes. Press Ctrl+S to do so. This will ensure that the macro remains deleted after you close Excel.
On Mac
-
1Open 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.
-
2Click 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.
-
3Click Tools. It's a menu item at the top of your Mac's screen. Clicking it prompts a drop-down menu.
-
4Select 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.
-
5Click Macros…. It's in the pop-out menu. Doing so opens the "Macros" window.[1]
-
6Click the "Macros in" drop-down box. This is near the bottom of the "Macros" window. A drop-down menu will appear.
-
7Click All Open Workbooks. It's in the drop-down menu.
-
8Select a macro. Click the name of the macro you want to delete.
-
9Click —. It's below the list of macros.
-
10Click Yes when prompted. This will remove the macro.
-
11Save your changes. Press ⌘ Command+S to do so. This will ensure that the macro remains deleted after you close Excel.
Community Q&A
-
QuestionWhat do I do if I get the error "cannot edit a macro on a hidden workbook"?Community AnswerClick "View" tab. Click "Unhide". A "Personal workbook" option will appear; select this. Once inside the Personal workbook, follow the steps in the tutorial above and it should delete easily.
-
QuestionWhat do I do if the Delete button is disabled?JLloydCommunity AnswerThe Delete button will be disabled if you didn't click "Enable Content" upon opening the macro. You can find this option in the yellow bar at the top of the Excel document. If the Delete button is still greyed out after enabling macros, you may not have permission to edit the document.
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.⧼thumbs_response⧽
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.