Enabling Macros message when NO macros in workbook

J

Jack Deuce

In order to fix a problem in 117 worksheets I created a macro to
basically FORMAT, PROTECTION, check Locked, and check Hidden, then
CTL-PGEDOWN to advance to the next worksheet. After formatting all
the sheets, I deleted the macro, TOOLS, MACRO, MACROS and delete.

Since doing this everytime I open the workbook I get the Security
Warning pointing to the workbook with the message "Macros may contain
viruses. It is usally safe to disable macros, but if the macros are
legitimate, you may lose some functionality". The user will then
have to choose "Disable Macro", "Enable Macro", or "More Info". I was
able to remove the message by changing the Macro Security level from
Medium to Low but would like to get the workbook back how it was
before creating then deleting the macro.

I'm afraid this will confuse the user when the new version of the
workbook is readied.

Anyone have any ideas. I using Excel 2003 with ASAPUtilites Addins.

Thanks.
 
J

James Ravenswood

You need to make sure that the module that conained the macro is deleted as well as the macro itself. Open the VBE (ALT-F11). Right click the module on the left-hand pane and specify Remove.
 
S

Stan Brown

In order to fix a problem in 117 worksheets I created a macro to
basically FORMAT, PROTECTION, check Locked, and check Hidden, then
CTL-PGEDOWN to advance to the next worksheet. After formatting all
the sheets, I deleted the macro, TOOLS, MACRO, MACROS and delete.

You deleted the macro, but you didn't delete the module that contains
it. Excel apparently is not smart enough to distinguish the empty
module.

Open your workbook and press Alt-F11 to bring up the Visual Basic
editor. In the explorer-style list at the top left, find your
workbook name. Double-click to expand it, if necessary. Double-
click on the module to see the code and make sure you haven't
forgotten about any other macro. The right-click the module and
delete it. Close VB Editor and then in Excel save the workbook.
 

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

Top