+ Reply to Thread
Results 1 to 4 of 4

Code to tell user macros off - problem with saveas

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    38

    Code to tell user macros off - problem with saveas

    Hi!!!

    The code tells the user that is excel macros are off or the security is too high.
    it hide all the sheets except the one that tell the user about the macros and when he activates the macros that page hides and all the others unhide.
    The problem is when i'm trying to save the document (saveas) with a diferent name it gives me an error on
    Please Login or Register  to view this content.
    How to correct this code?


    Thanks in advance


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Code to tell user macros off - problem with saveas

    Can you explain how thw macro works if macros aren't enabled or security is high? The code won't run, what should happen is the warning sheet should be visible.

    Use Before_Close, not Before_Save, see

    ForceUsersEnableMacros.zip
    Last edited by royUK; 08-17-2009 at 11:04 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-05-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Code to tell user macros off - problem with saveas

    Quote Originally Posted by royUK View Post
    Can you explain how thw macro works if macros aren't enabled or security is high? The code won't run, what should happen is the warning sheet should be visible.

    Use Before_Close, not Before_Save, see

    ForceUsersEnableMacros.zip

    Hi RoyUK

    Thanks for the help, "ForceUsersEnableMacros" it's easier...

    The other code it's working fine as you can see in the example i send, the problem was when i try to save with another name .

    Please Login or Register  to view this content.
    in office 2007 was working wrong i tried
    Please Login or Register  to view this content.
    and worked fine.... I'm sorry about my English i'm from Portugal

    Thanks again Roy

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Code to tell user macros off - problem with saveas

    No problem with your English, jmaocubo. I thought at first you weretrying o run a macro to tell the users to enable macros.

    If you have a solution mark this Thread solved.


    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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