Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 8 of 8

Thread: Workbook with VBA & Macro to activate Enable Macro on open workbook

  1. #1
    Join Date
    30th December 2011
    Location
    UK
    Posts
    114

    Workbook with VBA & Macro to activate Enable Macro on open workbook

    Hi All,

    I have a workbook with macros and vba code. Now is it possible to check and prompt the user to enable macros when they open this workbook if its not already enabled?

    Maybe a prompt to click yes to enable both macros and trust all vba content???


    I am using office 2010.

    Thank you all.

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    30th December 2011
    Location
    UK
    Posts
    114

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Anything on this guys?

    Thank you.

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    30th December 2011
    Location
    UK
    Posts
    114

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Anyone please?

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    1st September 2010
    Posts
    7,921

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    The basic conundrum is that if macros are disabled, no macro can run to check/force the user to enable them beforehand... you're left with the 'standard' Excel warnings about macros and relying on the user to make the proper choice.

    There are ways around this, but they all rely on hiding the sheets leaving only a basic 'introduction' sheet if the user has not enabled macros. There is a discussion about it somewhere on this board, but I can't find it at the moment (perhaps you'd like to try searching?) or you can have a read of this - http://www.cpearson.com/excel/EnableMacros.aspx

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    30th December 2011
    Location
    UK
    Posts
    114

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Thanks cytop.

    I have already looked at that but was wondering if there was any other way of switching it on through one click button for example without going to options.

    Thanks for your help though.

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    19th August 2011
    Posts
    6

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Sorry for the very late reply, but here is my solution. It compares the result of a simple UDFunction Plus (simple addition) to that of the +-operator.
    I use the TODAY() function because it is volatile and gets updated immediately on opening.
    If macros are not enabled an error message emerges to remind you.
    My first contribution to this great forum, hope it is still usefull
    Attached Files. REMINDER! OzGrid accepts no responsibility for ANY adverse effects as a result from downloading attached files. ALWAYS run an up-to-date virus scan and disable macros.

    Excel Video Tutorials / Excel Dashboards Reports


  7. #7
    Join Date
    28th August 2012
    Location
    Canada
    Posts
    15

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Another great option is to have a main sheet with the message "Please enable macros" on it. Have all the other sheets hidden on startup. Create a Macro on Workbook Open that hides the Main sheets with the message to enable macros and unhides the others worksheets . That way the only way to use the files is to enable macros.

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    19th August 2011
    Posts
    6

    Re: Workbook with VBA & Macro to activate Enable Macro on open workbook

    Agreed, that's a better solution - and by far more elegant

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Enable Excel sheet A macro from Excel sheet B macro
    By markelvu1 in forum EXCEL HELP
    Replies: 1
    Last Post: September 2nd, 2011, 17:03
  2. Replies: 2
    Last Post: October 3rd, 2006, 06:51
  3. macro enable
    By uziy in forum EXCEL HELP
    Replies: 1
    Last Post: July 11th, 2005, 22:23
  4. Enable Macro
    By dodger7 in forum EXCEL HELP
    Replies: 3
    Last Post: June 10th, 2005, 23:21
  5. Activate a macro
    By gmccreedy in forum EXCEL HELP
    Replies: 3
    Last Post: May 28th, 2005, 12:38

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
  •  
porno