delete macro in Excel97

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?

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.

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?

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.

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?