# delete macro in Excel97

**URL:** <https://boards.straightdope.com/t/delete-macro-in-excel97/113763>\
**Category:** Factual Questions\
**Created:** [June 13, 2002, 1:46am UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763 "2002-06-13T01:46:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [June 13, 2002, 1:46am UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763/1 "2002-06-13T01:46:32Z")

</div>

I have a _huge_ Excel file whith many sheets. I do not know what I have done but apparently, by mistake, a few unintended keystrokes and I have created some startup macro because every time I open that file I get the warning that it has a macro and would I want to execute it. I just say no and then continue but I would like to get rid of that annoyance. When I go to tools - macro I see no macros already there. Where is this macro hiding and how can I kill it?

---

<div class="post-metadata">

**Author:** ![Mandarax](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Mandarax](https://boards.straightdope.com/u/Mandarax)\
**Post date:** [June 13, 2002, 2:59am UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763/2 "2002-06-13T02:59:44Z")

</div>

You might have a user-defined function. Try going to “Tools”, “Macro”, “Visual Basic Editor…” and go through the folders in the upper left corner.

By the way – it’s not necessarily a “startup” macro. The default security settings for Excel will cause it to ask that question if there are _any_ macros or user-defined functions in the file. You can turn this feature off on the “General” tab of the options dialog box, but I sure don’t recommend it.

---

<div class="post-metadata">

**Author:** ![ice1000](https://avatars.discourse-cdn.com/v4/letter/i/a3d4f5/32.png) [@ice1000](https://boards.straightdope.com/u/ice1000)\
**Post date:** [June 13, 2002, 3:51am UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763/3 "2002-06-13T03:51:39Z")

</div>

You could have a macro in one of the worksheets themselves.

Go to Tools, Macro, Visual Basic Editor. On the right you should see a hierarchy of objects with your workbook as one of the parent nodes. If you don’t see this, select, View, Project Explorer.

When you expand the branch of your workbook, you’ll see each of your worksheets. Right click on one, select View Code. If you see any code, there’s your macro. Unfortunately, you’ll have to do this for each sheet.

If this doesn’t work, you could have a macro virus. Does this happen with any other workbooks?

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [June 13, 2002, 9:17am UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763/4 "2002-06-13T09:17:50Z")

</div>

ice1000, I followed your advice and found one sheet had what looked like an “empty macro”. I deleted it and now everything is back to normal. Thanks. One of these days I am going to have to learn Visual Basic.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [June 13, 2002, 7:58pm UTC](https://boards.straightdope.com/t/delete-macro-in-excel97/113763/5 "2002-06-13T19:58:59Z")

</div>

And while I have your attention: the tabs for the different sheets (at the bottom of the excel window) used to be smaller in the old computer and I kind of liked them that way. How can I make them smaller again?
