MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Locating Macros in an Excel Spreadsheet


Posted by Linda Hood on March 10, 2001 5:45 PM

My boss has a spreadsheet that an X-employee added macros to. She wants to remove all macros however this spreadsheet has over 50 worksheets each with hundreds of cells of data. Any suggestions for finding the macros?


Posted by Dave Hawley on March 10, 2001 6:11 PM

Hi Linda

Push Alt+F11 to open the VBE
Push Ctrl+R to show the "Project explorer" (may be visible aleady)
In the window to the left (Project explorer) you will see Folders either expanded or closed.
Open these (double click) and you will see "Module1", "Module2" etc.
Right click on each and select "Remove Module X". Say "No" to "Export module first?".
Do the same for each Module.

At the top of this Window you will also see "ThisWorkbook" and your sheet names under the Folder "Microsoft Excel Objects".
Double click each of these and if there is any code in there (plain white if none) highlight and delete.

Dave


OzGrid Business Applications

Posted by Dave Hawley on March 10, 2001 6:18 PM

In case you meant formulas


I just read that you mention Worksheets and Cells, so I'm thinking now you may have meant formulas ? If so, this is very simple:

Click any single cell
Push F5
Click "Special"
Select "formulas" and click "OK"
Push Delete
Do the same for all Worksheets


Dave


OzGrid Business Applications

Posted by Bret on March 11, 2001 4:33 PM

Hey again, Dave,

So why do you suppose my Sia6.xlt keeps saying there's macros in it? I don't see any of that stuff in VBA.


.xlt