+ Reply to Thread
Results 1 to 4 of 4

A button enables macros automatically

  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2007
    Posts
    10

    A button enables macros automatically

    Hi all,
    I have written a macro that give two sheets. One is prompt to force user to enable macros, then the sheet prompt disappear. Second is the code sheet which has many formulas.

    Now, I want to have a code for a button which enables macros automatically when the user press on it. Any suggestions?

    Thanks in advance

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: A button enables macros automatically

    You can not automate the enabling of macros - that would rather negate the point of the security in the first instance.

    You should set your file up such that only one sheet is visible when the file is opened which provides instructions for enabling macros - use the Workbook_Open event to hide this sheet and unhide (veryhidden) the others such that if the file is opened with Macros enabled the instruction sheet is hidden and working sheets are visible.

    For a more thorough explanation of this process see: http://www.cpearson.com/excel/EnableMacros.aspx

    Please also note discussions as to how to circumvent security are not permitted on this board so should the thread head off in that direction appropriate action will be taken etc...

  3. #3
    Registered User
    Join Date
    11-24-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: A button enables macros automatically

    That was actually what I did. Nevertheless, I aim to have a button in the first sheet (prompt) which enables macros when the user press on. Only, if available!

    Thanks

  4. #4
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Office 2003 / Office 2007
    Posts
    114

    Re: A button enables macros automatically

    As he explained, that is not possible.

    There are other ways provided by Excel itself, which allow macros to run without a prompt. Cant say I've tested them with macros specifically disabled though.

+ 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.6.0 RC 1