Disable Macro Message - No Macros

W

Wayne

When opening a workbook I get the enable/disable macro
dialog box. There is no macro in the workbook and I'd
like to stop the message occurring - it's confusing the
users. The workbook did, at one time, contain some macros
but does no longer - the list under Alt-F8 is empty. How
do I stop the message being displayed when the workbook
opens?
 
H

Harald Staff

The Alt F8 list does not necessarily show all macro code.

Open the VB editor (Alt F11). In the project explorer up left, remove all modules
(rightclick > remove). Then doubleclick every other object (Sheet1, Sheet2, ThisWorkbook,
....) in the same explorer and remove absolutely all text that may be there. Save.
 
R

Rob

Try checking each sheet for code while in the Visual Basic
Editor, sometimes there are event macros in there. A good
bet might be code on 'ThisWorkbook'.
 
P

Paul Simon

Wayne,

Usually, this is due to the fact that even though the macros,
themselves, have been deleted, the module(s) that held them still
exist.

1.) Go into the Visual Basic Editor (Alt+F11 is a shortcut).
2.) Find the file in question in the Project pane (usually the left
pane on the screen).
3.) If you find a folder called "Modules" under that file, click the
"+" sign next to it, and a list of modules will appear. (More than
likely, you'll only find Module1.)
4.) Double-click on it to view its contents in the right pane. If
there's nothing there, them that's the culprit.
5.) Right-Click on the module in the left pane (again, it's probably
Module1), choose Remove Module1 on the pop-up menu and answer No to
export before deleting.
6.) Save the file and close it.

The next time you open the file, you shouldn't get the Enable/Disable
Macro Dialog box.

I hope this solved your problem.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top