+ Reply to Thread
Results 1 to 8 of 8

Prevent Save As

  1. #1
    CarlSprake
    Guest

    Prevent Save As

    I am hoping that someone can help me with this problem.

    Is there anyway to prevent a user from doing File - Save As? (preferably
    using macros)

    I am happy for them to make changes to a workbook, but do not want them to
    be able to create different copies.

    Thanks for your help

  2. #2
    Martin
    Guest

    RE: Prevent Save As

    Go to the ThisWorkbook module and choose Workbook from the first dropdown at
    the top of the module window (rather than General). Choose BeforeSave from
    the righthand dropdown: this is a macro that will run automatically when
    someone attempts to save the file. The following cancels the whole save
    operation if the user chooses Save As:

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If SaveAsUI = True Then Cancel = True
    End Sub


    "CarlSprake" wrote:

    > I am hoping that someone can help me with this problem.
    >
    > Is there anyway to prevent a user from doing File - Save As? (preferably
    > using macros)
    >
    > I am happy for them to make changes to a workbook, but do not want them to
    > be able to create different copies.
    >
    > Thanks for your help


  3. #3
    Dave Peterson
    Guest

    Re: Prevent Save As

    You won't be able to stop them.

    Heck, they could go into Windows explorer and copy that file and put it anywhere
    they want.

    CarlSprake wrote:
    >
    > I am hoping that someone can help me with this problem.
    >
    > Is there anyway to prevent a user from doing File - Save As? (preferably
    > using macros)
    >
    > I am happy for them to make changes to a workbook, but do not want them to
    > be able to create different copies.
    >
    > Thanks for your help


    --

    Dave Peterson

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    You could have the Auto_Open check the filepath if it is different to the one hardcoded then Kill the application, that way any other copies that are made and stored else where will be deleted when they are opened....................or something like that..........it's just a thought!

    Regards,
    Simon

  5. #5
    Dave Peterson
    Guest

    Re: Prevent Save As

    And if macros are disabled (or the auto_open/workbook_open procedures are
    disabled), then the user can still do what they want.

    And macro security isn't too difficult to break--so even protecting the project
    wouldn't stop any person really interested.

    Simon Lloyd wrote:
    >
    > You could have the Auto_Open check the filepath if it is different to
    > the one hardcoded then Kill the application, that way any other copies
    > that are made and stored else where will be deleted when they are
    > opened....................or something like that..........it's just a
    > thought!
    >
    > Regards,
    > Simon
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=525252


    --

    Dave Peterson

  6. #6
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    How about opening one workbook to call another, that way if macro's aren't enabled it will never call the other workbook but if it does then the protection of the filepath check and the save as disabled should afford some better security than having it all in one workbook.................anyway i dont know why i'm professing about the rights and wrongs because when it comes to programming im as thick as the next guy!

    Regards,

    Simon.

  7. #7
    Dave Peterson
    Guest

    Re: Prevent Save As

    Yep. That's a common suggestion. But since the project protection of the
    opening workbook can be broken, then the password to the real workbook can be
    found.

    Excel's security isn't really meant to protect intellectual property.



    Simon Lloyd wrote:
    >
    > How about opening one workbook to call another, that way if macro's
    > aren't enabled it will never call the other workbook but if it does
    > then the protection of the filepath check and the save as disabled
    > should afford some better security than having it all in one
    > workbook.................anyway i dont know why i'm professing about
    > the rights and wrongs because when it comes to programming im as thick
    > as the next guy!
    >
    > Regards,
    >
    > Simon.
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=525252


    --

    Dave Peterson

  8. #8
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Good job i'm not an intellectual then!

    Regards,

    Simon

+ 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