+ Reply to Thread
Results 1 to 9 of 9

Preventing an Excel file from being saved

  1. #1
    Hall
    Guest

    Preventing an Excel file from being saved

    Is it possible to set an Excel file so it can't be saved by the user? Can't
    be saved locally or anywhere else?



  2. #2
    CLR
    Guest

    RE: Preventing an Excel file from being saved

    In a word, NO.

    You can get cute with a "Before Save" macro that will shut down the book, or
    erase things, or a pop-up saying "If you continue you will be reported", etc,
    etc, but it is only good if the user originally "enabled macros" when
    starting the file.

    You cannot "legislate" integrity.

    Maybe a .pdf conversion is the thing for you to use in this case.

    Vaya con Dios,
    Chuck, CABGx3



    "Hall" wrote:

    > Is it possible to set an Excel file so it can't be saved by the user? Can't
    > be saved locally or anywhere else?
    >
    >
    >


  3. #3
    Bazwaz
    Guest

    Re: Preventing an Excel file from being saved

    Save it as a template. with an XLT file extension, in a read only folder.
    That way when the user opens it, it is an XLS file, and has a serial number
    tacked on the end.
    When the user saves it, it has a new name file1.xls, file2.xls etc.
    Your original file isn't damaged. Safe.
    But it doesn't prevent the user from having a copy.

    If this is OK for you, watch out for some confusion if you have filenames
    that already have numbers
    such as :
    "Budget v.1.xlt", this will become "budget v.11.xls"
    Likewise
    "Budget March 2006.xlt" will become "Budget March 20061.xls"
    HTH
    Bazwaz


    "Hall" <hall@garp.org> a écrit dans le message de news:
    uYgA%23PvXGHA.3724@TK2MSFTNGP02.phx.gbl...
    > Is it possible to set an Excel file so it can't be saved by the user?
    > Can't be saved locally or anywhere else?
    >




  4. #4
    Pete_UK
    Guest

    Re: Preventing an Excel file from being saved

    If you want to pursue Chuck's points further, here's a link to a site
    which gives a way of forcing a User to enable macros:

    http://www.danielklann.com/excel/for...be_enabled.htm

    However, what is to stop a User using Windows Explorer to save a file
    onto some removeable media?

    Hope this helps.

    Pete


  5. #5
    CLR
    Guest

    Re: Preventing an Excel file from being saved

    How cool that is Pete.............thanks for sharing it.

    (every day I learn sumpthin new, mumble, mumble)

    Vaya con Dios,
    Chuck, CABGx3



    "Pete_UK" wrote:

    > If you want to pursue Chuck's points further, here's a link to a site
    > which gives a way of forcing a User to enable macros:
    >
    > http://www.danielklann.com/excel/for...be_enabled.htm
    >
    > However, what is to stop a User using Windows Explorer to save a file
    > onto some removeable media?
    >
    > Hope this helps.
    >
    > Pete
    >
    >


  6. #6
    JE McGimpsey
    Guest

    Re: Preventing an Excel file from being saved

    Note that Daniel's technique, while an excellent method to prevent
    accidentally opening the file with macros disabled, isn't designed to
    keep even the moderately curious from bypassing the "force" entirely...

    - Since he didn't recommend protecting the code from viewing, it would
    be trivial for a user to delete the protection in the VBE.

    - Even if he had recommended protecting the code from viewing, bypassing
    that protection is fairly trivial.

    - If the user saves the file, then closes it without saving, the file
    can then be opened with macros disabled, and all working sheets will be
    displayed.

    The latter, of course, would be mitigated if you had code to prevent
    saving, but the first two are deadly if you want to really keep someone
    from bypassing your restrictions.

    In article <1144936742.059323.231660@i39g2000cwa.googlegroups.com>,
    "Pete_UK" <pashurst@auditel.net> wrote:

    > If you want to pursue Chuck's points further, here's a link to a site
    > which gives a way of forcing a User to enable macros:
    >
    > http://www.danielklann.com/excel/for...be_enabled.htm


  7. #7
    CLR
    Guest

    Re: Preventing an Excel file from being saved

    UGH.........just when I thought it was safe to go back in the water........

    I guess it's true that, "locks just keep the honest folks out"..............

    Vaya con Dios,
    Chuck, CABGx3



    "JE McGimpsey" wrote:

    > Note that Daniel's technique, while an excellent method to prevent
    > accidentally opening the file with macros disabled, isn't designed to
    > keep even the moderately curious from bypassing the "force" entirely...
    >
    > - Since he didn't recommend protecting the code from viewing, it would
    > be trivial for a user to delete the protection in the VBE.
    >
    > - Even if he had recommended protecting the code from viewing, bypassing
    > that protection is fairly trivial.
    >
    > - If the user saves the file, then closes it without saving, the file
    > can then be opened with macros disabled, and all working sheets will be
    > displayed.
    >
    > The latter, of course, would be mitigated if you had code to prevent
    > saving, but the first two are deadly if you want to really keep someone
    > from bypassing your restrictions.
    >
    > In article <1144936742.059323.231660@i39g2000cwa.googlegroups.com>,
    > "Pete_UK" <pashurst@auditel.net> wrote:
    >
    > > If you want to pursue Chuck's points further, here's a link to a site
    > > which gives a way of forcing a User to enable macros:
    > >
    > > http://www.danielklann.com/excel/for...be_enabled.htm

    >


  8. #8
    Dave Peterson
    Guest

    Re: Preventing an Excel file from being saved

    Actually, Daniel's code calls HideSheets in the Before_close event. And that
    routine saves the file.

    Personally, I think that this is just as bad (maybe worse). If the user opens
    the file and makes some disasterous changes and wants to close without saving,
    the user would have to know how to avoid that event. And if the user doesn't,
    the file may be ruined.

    And if the user knows enough to avoid the event, then it wouldn't be too much of
    a stretch to see how the whole routine could be bypassed.



    JE McGimpsey wrote:
    >
    > Note that Daniel's technique, while an excellent method to prevent
    > accidentally opening the file with macros disabled, isn't designed to
    > keep even the moderately curious from bypassing the "force" entirely...
    >
    > - Since he didn't recommend protecting the code from viewing, it would
    > be trivial for a user to delete the protection in the VBE.
    >
    > - Even if he had recommended protecting the code from viewing, bypassing
    > that protection is fairly trivial.
    >
    > - If the user saves the file, then closes it without saving, the file
    > can then be opened with macros disabled, and all working sheets will be
    > displayed.
    >
    > The latter, of course, would be mitigated if you had code to prevent
    > saving, but the first two are deadly if you want to really keep someone
    > from bypassing your restrictions.
    >
    > In article <1144936742.059323.231660@i39g2000cwa.googlegroups.com>,
    > "Pete_UK" <pashurst@auditel.net> wrote:
    >
    > > If you want to pursue Chuck's points further, here's a link to a site
    > > which gives a way of forcing a User to enable macros:
    > >
    > > http://www.danielklann.com/excel/for...be_enabled.htm


    --

    Dave Peterson

  9. #9
    Bruce Sinclair
    Guest

    Re: Preventing an Excel file from being saved

    In article <9F356122-9243-4248-BFDA-881D2038BB93@microsoft.com>, =?Utf-8?B?Q0xS?= <CLR@discussions.microsoft.com> wrote:
    >UGH.........just when I thought it was safe to go back in the water........
    >
    >I guess it's true that, "locks just keep the honest folks out"..............


    Nope ... the lazy.
    You just need a lock that's better than your neighbours to avoid burglaries
    of your place.


    Bruce

    ----------------------------------------
    I believe you find life such a problem because you think there are the good
    people and the bad people. You're wrong, of course. There are, always and
    only, the bad people, but some of them are on opposite sides.

    Lord Vetinari in Guards ! Guards ! - Terry Pratchett

    Caution ===== followups may have been changed to relevant groups
    (if there were any)


+ 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