Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy Protection (97 SR2)

    Perhaps it's not possible, but I thought i'd take a stab before I write it off...

    Is there a way to instate copy protection for a worksheet? Basically, I only want the file to save over itself IF the new file is larger than the current saved version.

    Any ideas?

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Copy Protection (97 SR2)

    Well you need to save the file to determine what size it is (would be). So I suppose you could use teh BeforeSave event to save a tempory file, compare it's size with the size of the workbook you worked with, and if bigger overwrite the original and delete the temporary file. Ortherwise close the file and delete the tempory file.

    Andrew C

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Copy Protection (97 SR2)

    DrkRealm

    Andrew did provide a neat solution, but the file size can increase, decrease or even stay the same for many reasons. This may need some fine tuning before it gives you any meaningful information.

    Consider this:
    1) User changes cell A1 on sheet 1 from A to B, file size did not change.
    2) User changes cell A2 on sheet 1 from empty to something else, file size may increase. Yeah Right one cell is not going to do it, but think of it in abstract terms.
    3) User changes cell A1 from full to empty file size decreases, again abstract...

    So what do you do with these changes? Discard them?

    Have you considered making the workbook Read-Only?

    Just a couple of thoughts...

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Protection (97 SR2)

    Interesting...

    Well, the schema doesn't support removal of data, only entrance. The thing is a mass of twists and turns which captures and retains data.

    I was able to bypass all this by instating an auto-recover function, so there's no concern of over-writing files anymore, it Truely TRAPS the data, there's no escape, Oh yes... <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    Thanks for the feedback! <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •