ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Enabling Macros message when NO macros in workbook (https://www.excelbanter.com/excel-worksheet-functions/446773-enabling-macros-message-when-no-macros-workbook.html)

Jack Deuce

Enabling Macros message when NO macros in workbook
 
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.

James Ravenswood

Enabling Macros message when NO macros in workbook
 
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.

Jack Deuce

Enabling Macros message when NO macros in workbook
 
Thanks a lot James. I never would have figured that out on my own.

On Sat, 4 Aug 2012 13:08:14 -0700 (PDT), James Ravenswood
wrote:

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.



Stan Brown

Enabling Macros message when NO macros in workbook
 
On Sat, 04 Aug 2012 14:20:59 -0500, Jack Deuce wrote:

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.


--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...


All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com