+ Reply to Thread
Results 1 to 3 of 3

Macro to force macros to be enabled and prevent saving

  1. #1
    Registered User
    Join Date
    05-25-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Macro to force macros to be enabled and prevent saving

    I have the below code that successfully hides all my sheets bar one if the excel document is open without macros enabled.
    Please Login or Register  to view this content.
    My problem is though when I add the below code this prevents the above code from working. The below code prevents the user from saving a copy of my spreadsheet, they both work fine sperately but once I put both bits of code into my workbook the above code stops working. Any help is greatly appreciated!
    Please Login or Register  to view this content.
    Last edited by DeckyB; 05-31-2010 at 04:03 PM. Reason: Added Code Tags

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to force macros to be enabled and prevent saving

    First, to stop the user from saving, wouldn't it be as simple as:
    Please Login or Register  to view this content.

    Then, when you want a macro to save, it needs to turn OFF other macros first else it would trigger the macro above:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-25-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Macro to force macros to be enabled and prevent saving

    Quote Originally Posted by JBeaucaire View Post
    First, to stop the user from saving, wouldn't it be as simple as:
    Please Login or Register  to view this content.

    Then, when you want a macro to save, it needs to turn OFF other macros first else it would trigger the macro above:
    Please Login or Register  to view this content.
    Cheers Jerry

+ 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