+ Reply to Thread
Results 1 to 4 of 4

Thread: VBA MsgBox to inform users to enable macro options.

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    72

    VBA MsgBox to inform users to enable macro options.

    All,

    I am looking for vba language that would active a message box saying "Please enable macros by clicking on the options button below the formula bar." I need this message box to appear as soon as the file is opened. Right now I am using:

    Private Sub Workbook_Open()
    MsgBox "Please enable macros by clicking on the options button below the formula bar."
    End Sub
    The code that I currently have only shows up AFTER you select options and not right when the spreadsheet is open.

    Any help is greatly appreciated.
    The Exceller
    If I helped you, please add to my reputation by clicking on the scale by my name in this post.

  2. #2
    Valued Forum Contributor OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,647

    Re: VBA MsgBox to inform users to enable macro options.

    How do you hope to get code to run before the users enable code?

    You need the reverse approach - a workbook with a prompt sheet that is only hidden by the macros running. See for example here.
    Last edited by OnErrorGoto0; 02-08-2012 at 04:28 PM.
    Good luck.

  3. #3
    Forum Guru Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,276

    Re: VBA MsgBox to inform users to enable macro options.

    My suggestion would be to create an opening page that activates with each close of the workbook. The opening page could have any form of letting the user know to enable macros. As it is, your code cannot fire until macros are enabled so it makes the message moot. I have the same issues with a workbook that is meant to be used corporate wide where I work and I made a page that shows the user where to click in case they don't know to do so.
    Please leave a message after the beep!

  4. #4
    Registered User
    Join Date
    04-29-2010
    Location
    McLean, VA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    72

    Re: VBA MsgBox to inform users to enable macro options.

    Thanks for the input.

    OEG0, I'm using the example in the link you shared but unfortunately, when it unhides all the sheets in the workbook after enabling the macros, it's unhiding some sheets that I want to keep hidden and not share with the users. Is there a way to use the same example and have it only unhide specified sheets by their tab name once the macros are enabled? That would help tremendously.

    Thanks.
    The Exceller
    If I helped you, please add to my reputation by clicking on the scale by my name in this post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0