Deleting the Invisible Excel Macro

Monday, June 18th, 2007 at 2:05 PM | Category: Meryl's Notes Blog, Tech 8 comments

In managing a big family weekend, I used Excel to track everything from invitations to RSVPs. I tried to create a macro to do something, but deleted it after figuring out it wouldn’t do what I wanted. Yet, every time I opened the workbook, Excel asked if I wanted to run macros as shown in the below image.

macros.gif

What the hey? I deleted the macro. Why are you asking, Excel? So I thought the macro wasn’t deleted. I opened the Macro dialog box (Tools > Macro > Macros), which showed NOTHING indicating no macros existed in this workbook.

OK, so why are you giving me these macro messages? If I can’t find an answer to a Microsoft problem, I post the problem in the Microsoft forums where MVPs often provide the answer. This time, I lucked out on finding the solution myself (which doesn’t happen often as I guess I find the rare problems). Here are the steps I used since my situation didn’t need to do all the steps shown in the solution — the only folder that appeared as the Microsoft Excel Objects.

1. Save a back-up of the file and work from the back-up. If it works, you can save the back-up over the original file.

2. Right-click any tab and select View Code.

macros2.gif

3. Double-click the first item in the Microsoft Excel Objects folder.

macros3.gif

4. Press Ctrl+A to select everything (even if nothing shows) and press Delete.

5. Repeat Steps 2 and 3 until completed for all items in the Microsoft Excel Objects folder.

6. Close the Visual Basic Editor.

7. Save the workbook.

Open the workbook again and the Macro message should be gone for good.

If you have a modules folder, expand it (click Modules folder once to expand) and right-click the module. Select Remove Module. Excel asks if you want to export it — up to you. Repeat the steps for all modules. Once done, do Steps 6 and 7.

Tags: , ,

Subscribe to this here blog: RSS or E-mail

8 comments

Post a comment (or leave a trackback)

  • CommentLuv Enabled

RSS Subscribe to be notified when new comments are added.


Get Updates