Why do get the "enable macro" question when I open my file?

marnie

Board Regular
Joined
Apr 26, 2002
Messages
86
I created a file last week and there are no macros in it. Today when I opened it, I got the warning message, "do you want to enable macros"? I don't know how the macro got in there and I can't find it. Is there a way to search for the macro that Excel thinks is in it?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
If you're worried about it, don't enable them, then just right-click on one of the sheet tabs and select "view code." It should show you any/all of the code in that file.
 

marnie

Board Regular
Joined
Apr 26, 2002
Messages
86
Love your cat picture.

I'll keep disabling the macro, but it's kind of a pain, I'd like to just delete the macro. When I view code, I get the visualbasic window, but there's no option to delete anything.

From the Excel menu, if I click tools and macros, there are no macros listed.
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
They're not necessarily going to show up if you go to that macros dialog box.

If you go back to the Visual Basic window (you can also press alt+F11 to get there), do you see a "tree" kind of thing off on one side? It's the Project window (if you don't see it, just go to View|Project Explorer). Check everything listed under the name of the file you have open. If there is anything there, you can select it and delete it just like text.
 

marnie

Board Regular
Joined
Apr 26, 2002
Messages
86

ADVERTISEMENT

Thanks, that worked. In visual basic, I did have to choose the project explorer on the view menu. I would have never known to do that. Then I had to select each sheet individually then right click and "view code" from there. A bunch of sheets had something there. It was all greek to me (I'm a little worried how it got there), but I deleted it, resaved the file. When I reopened, they were gone. I'll bet there is a faster way, but it doesn't matter, I'll probably never run into that again.

Thanks again.
 

Dexter

Board Regular
Joined
Apr 3, 2002
Messages
71
Marnie,

Sounds like you caught a wee-bit of a virus. I had one similar to yours that drove me nuts because it kept appearing in more and more of my files. It was a clever but highly contagious bug that worked its way into my startup directory. Speak up if you begin to see more of this mysterious wonder.
 

marnie

Board Regular
Joined
Apr 26, 2002
Messages
86
Thanks Dexter, I suspected I might have a virus. Doesn't seem too dangerous, just a little annoying. The last couple spreadsheets haven't done this, but I'll be on the look out.
 

Forum statistics

Threads
1,144,149
Messages
5,722,794
Members
422,459
Latest member
Chriselff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top