+ Reply to Thread
Results 1 to 12 of 12

How do I stop an Excel file from being copied

  1. #1
    John Driscoll
    Guest

    How do I stop an Excel file from being copied

    I want to allow a company to use a spreadsheet I have developed but do not
    want them to copy or distribute it. Can I protect the file please? Please
    return answers to: [email protected]

  2. #2
    Peo Sjoblom
    Guest

    Re: How do I stop an Excel file from being copied

    Not possible..


    --

    Regards,

    Peo Sjoblom


    "John Driscoll" <[email protected]> wrote in message
    news:[email protected]...
    > I want to allow a company to use a spreadsheet I have developed but do not
    > want them to copy or distribute it. Can I protect the file please?

    Please
    > return answers to: [email protected]




  3. #3
    Dave Peterson
    Guest

    Re: How do I stop an Excel file from being copied

    Not really.

    Anything that you try could be stopped by a curious person.

    John Driscoll wrote:
    >
    > I want to allow a company to use a spreadsheet I have developed but do not
    > want them to copy or distribute it. Can I protect the file please? Please
    > return answers to: [email protected]


    --

    Dave Peterson

  4. #4

    Re: How do I stop an Excel file from being copied

    I have the same URGENT need. I was thinking about this for a while and
    I have some questions:

    1- Is it possible to REQUIRE enabled macros for a worksheet to open?
    2- If it is, then perhaps opening the sheet will prompt checking for
    the existence of a file somewhere on the network
    3- If the file is not found, then the macro will force excel to quit

    I realize that even if this is doable, it still will not be too
    difficult to work around, esp as I want to prevent the DATA inside the
    sheet from being copied, and it might be possible to access this data
    outside the Excel environment. Still, this might be sufficient for my
    purposes as the people who are using the sheet are not too technically
    sophisticated.

    Your input/thoughts will be greatly appreciated.


  5. #5
    Dave Peterson
    Guest

    Re: How do I stop an Excel file from being copied

    #1. You could use another workbook that contains a macro that opens the real
    workbook. If macros are disabled for that helper workbook, then the real
    workbook won't open. If macros are enabled, then macros will be enabled for the
    real workbook.

    #2. dim teststr as string
    teststr = ""
    on error resume next
    teststr = dir("\\server\share\folder\filename.txt")
    on error goto 0

    if teststr = "" then
    thisworkbook.close savechanges:=false
    end if

    'continue with code

    #3. See #2.

    But all this depends on the curiousity/honesty of the users. It isn't too
    difficult to bypass the project's protection. Then the code could be modified
    to avoid all this stuff.

    If you really have intellectual property that you want to protect, I don't think
    excel and VBA are the way to go.



    [email protected] wrote:
    >
    > I have the same URGENT need. I was thinking about this for a while and
    > I have some questions:
    >
    > 1- Is it possible to REQUIRE enabled macros for a worksheet to open?
    > 2- If it is, then perhaps opening the sheet will prompt checking for
    > the existence of a file somewhere on the network
    > 3- If the file is not found, then the macro will force excel to quit
    >
    > I realize that even if this is doable, it still will not be too
    > difficult to work around, esp as I want to prevent the DATA inside the
    > sheet from being copied, and it might be possible to access this data
    > outside the Excel environment. Still, this might be sufficient for my
    > purposes as the people who are using the sheet are not too technically
    > sophisticated.
    >
    > Your input/thoughts will be greatly appreciated.


    --

    Dave Peterson

  6. #6
    Harlan Grove
    Guest

    Re: How do I stop an Excel file from being copied

    Dave Peterson wrote...
    >#1. You could use another workbook that contains a macro that opens the real
    >workbook. If macros are disabled for that helper workbook, then the real
    >workbook won't open. If macros are enabled, then macros will be enabled for the
    >real workbook.


    Another alternative is using a do-nothing udf in most formulas. For
    example,

    Function nada() : End Function

    This will always return a VBA variant Empty value which Excel treats
    the same as the value of blank cells, so add it to formulas that should
    return numbers and concatenate it at the end of formulas that should
    return text. If the user opens the workbook with macros disabled, all
    formulas containing this udf will evaluate as errors. Add a message
    formula like

    =IF(ISERROR(nada()),"Nice try. You have to enable macros for this
    workbook to calculate correctly. Close it an reopen it with macros
    enabled.","")

    >But all this depends on the curiousity/honesty of the users. It isn't too
    >difficult to bypass the project's protection. Then the code could be modified
    >to avoid all this stuff.

    ....

    Which is why the udf approach can be safer. While it may be easy to use
    Edit > Replace to replace +nada() and &nada() with nothing, it gets
    harder to deal with all the variations in which nada() could be used.
    Add nada() calls to several defined names too. Still possible to
    disable, but it can be made to take a LOT of effort to remove it from
    all formulas and name definitions.


  7. #7

    Re: How do I stop an Excel file from being copied

    Thanks guys... these are just great ideas!. I think I will end up doing
    a combination of these approaches: helper workbook that opens the real
    workbook + checking for a file on network + a do-nothing function(
    BRILLIANT idea, btw)


  8. #8
    Registered User
    Join Date
    12-12-2017
    Location
    LONDON
    MS-Off Ver
    2013
    Posts
    1

    Re: Solution for Preventing: Use MAC or Physical adresses

    I dont know about what the program should be written
    but if we associate(match) the excel_file with a particular MAC address or list of Mac Addresses,
    So it can not be opened except of it.

    Please complie VBA code using my idea, and share it here also.

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: How do I stop an Excel file from being copied

    Usama23,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: How do I stop an Excel file from being copied

    Usama23,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads (13 years old) are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How do I stop an Excel file from being copied

    I did following

    with extra sheet (very hidden) in workbook
    code in workbook open

    Please Login or Register  to view this content.
    This way the copy wont work

    Kind regards
    Leo

  12. #12
    Registered User
    Join Date
    02-06-2019
    Location
    Otopeni
    MS-Off Ver
    ofice 2016
    Posts
    1

    Re: How do I stop an Excel file from being copied

    Hi, do you have a example wher to put that code?

+ 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