+ Reply to Thread
Results 1 to 2 of 2

Display Warning for Disabled Macros

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    Irvine, California
    MS-Off Ver
    Excel 2003
    Posts
    8

    Question Display Warning for Disabled Macros

    We have a workbook that is heavily dependent on macros. Unfortunately, we find that users are not always aware that they have macro disabled. This can happen if they have the Macro Settings option set to "Disable all macros without notification." Surprisingly, the same problem can happen with Macro Settings set to "Disable all macros with notification." With this setting, a Security Warning toolbar appears when the workbook is opened. However, the Security Warning toolbar is not very prominent, and it actually disappears after about 10 minutes anyway. Once it has disappeared, there doesn't seem to be any way to make it reappear.

    So the question is, how can we prominently and permanently display a warning that macros are not enabled -- without using a macro to do it, since it can't run in that case?
    I experimented with setting all the table headings in our workbook so their text is initially something like "Warning: Macros are Disabled." Then, if macros get enabled, the macros would update the table headings to their proper values and the warning message goes away.

    The problem with this approach is that it can only work once. After the user closes the workbook and reopens it again later, the table headings retain the values that were assigned by the macro, so they no longer display the warning message.

    It's interesting that cell functions still work even when macros are disabled. A cell function could conceivably check some kind of flag to tell whether macros are running.
    But I don't know of any kind of flag that macros could set that would be visible to a cell function, and that would also revert to its original state each time the workbook is closed and reopened.

    Any suggestions? Thanks!

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Display Warning for Disabled Macros

    You should look at this thread.

    http://www.excelforum.com/excel-gene...using-vba.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1