Closed Thread
Results 1 to 14 of 14

Preventing someone from e-mailing an Excel spreadsheet?

  1. #1
    THE BIG O
    Guest

    Preventing someone from e-mailing an Excel spreadsheet?

    Hi,

    Is there the capability to lock down Excel to the point that one could not
    e-mail it to another person. I have created over 1/2 dozen tools for
    branches to use but our concern is that they may e-mail them to a customer or
    carrier ( a very bad thing).

    Thanks

  2. #2
    Forum Contributor
    Join Date
    02-15-2005
    Location
    Central UK
    MS-Off Ver
    Office 365
    Posts
    175
    Don't know that theres a way to stop someone from emailing spreadsheets - even if you could stop them they could simply change the file extension; email it then change the file extension back to .xls

    Why not just password protect the sheets? You can hide the formulas, lock certain cells, recolour text to white (to hide it) etc.

    Is this a possibility?

  3. #3
    Dave Peterson
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    Nope.

    Maybe the usual threats would work???



    THE BIG O wrote:
    >
    > Hi,
    >
    > Is there the capability to lock down Excel to the point that one could not
    > e-mail it to another person. I have created over 1/2 dozen tools for
    > branches to use but our concern is that they may e-mail them to a customer or
    > carrier ( a very bad thing).
    >
    > Thanks


    --

    Dave Peterson

  4. #4
    THE BIG O
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    I have protected both sheets and workbooks and locked all of cells that need
    to be. There there are drop down boxes which provides information based, on
    the selection, from the hiddent sheets. Anything that shows to the user
    could be seen by a customer or carrier if a branch were to intentionally or
    unintentially send it to them. That is why we want do not want to allow the
    files to be e-mailed.

    Michael


    "y_not" wrote:

    >
    > Don't know that theres a way to stop someone from emailing spreadsheets
    > - even if you could stop them they could simply change the file
    > extension; email it then change the file extension back to .xls
    >
    > Why not just password protect the sheets? You can hide the formulas,
    > lock certain cells, recolour text to white (to hide it) etc.
    >
    > Is this a possibility?
    >
    >
    > --
    > y_not
    > ------------------------------------------------------------------------
    > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    >
    >


  5. #5
    Greg Wilson
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    You can't prevent someone from emailing it but you can do the following to
    safeguard the contents:

    1. Have wb_close event code that unhides and activates a message sheet and
    also hides all other sheets (xlVeryHidden). The message sheet simply displays
    a message that tells users they must enable macros to use the wb. Macros must
    be enabled for this to work.

    2. Have wb_open event code that looks for a secret file on your company's
    network or on the harddrive of authorized computers. If not found then the wb
    will give a message to the effect that access is denied and then promply
    close (you could also include a password override option). Macros must be
    enabled for this to work.

    3. If the above file is found then the wb_open code hides the message sheet
    and unhides the other sheets. Therefore, the wb opens in a normal state. The
    user will not see the message sheet.

    Note that if the user elects not to enable macros then they will only see
    the message sheet (which tells them they must enable macros to use the wb)
    and all other sheets will remain hidden. If they enable macros then the above
    features will work.

    If someone emails the wb to an outsider then the secret file will not exist
    at their location. They will not be able to use the wb if macros are enabled
    or not enabled. Also note that xlVeryHidden worksheets can only be unhidden
    through the VB Project. The above strategy can only (to my knowledge) be
    circumvented by breaking the VB Project protection which is likely too
    difficult for the candidates you refer to.

    Regards,
    Greg


    "THE BIG O" wrote:

    > I have protected both sheets and workbooks and locked all of cells that need
    > to be. There there are drop down boxes which provides information based, on
    > the selection, from the hiddent sheets. Anything that shows to the user
    > could be seen by a customer or carrier if a branch were to intentionally or
    > unintentially send it to them. That is why we want do not want to allow the
    > files to be e-mailed.
    >
    > Michael
    >
    >
    > "y_not" wrote:
    >
    > >
    > > Don't know that theres a way to stop someone from emailing spreadsheets
    > > - even if you could stop them they could simply change the file
    > > extension; email it then change the file extension back to .xls
    > >
    > > Why not just password protect the sheets? You can hide the formulas,
    > > lock certain cells, recolour text to white (to hide it) etc.
    > >
    > > Is this a possibility?
    > >
    > >
    > > --
    > > y_not
    > > ------------------------------------------------------------------------
    > > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    > >
    > >


  6. #6
    THE BIG O
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    This sounds like something that I probably can get our IT dept to write up
    for me. Thank you Greg for your assistance.

    Michael

    "Greg Wilson" wrote:

    > You can't prevent someone from emailing it but you can do the following to
    > safeguard the contents:
    >
    > 1. Have wb_close event code that unhides and activates a message sheet and
    > also hides all other sheets (xlVeryHidden). The message sheet simply displays
    > a message that tells users they must enable macros to use the wb. Macros must
    > be enabled for this to work.
    >
    > 2. Have wb_open event code that looks for a secret file on your company's
    > network or on the harddrive of authorized computers. If not found then the wb
    > will give a message to the effect that access is denied and then promply
    > close (you could also include a password override option). Macros must be
    > enabled for this to work.
    >
    > 3. If the above file is found then the wb_open code hides the message sheet
    > and unhides the other sheets. Therefore, the wb opens in a normal state. The
    > user will not see the message sheet.
    >
    > Note that if the user elects not to enable macros then they will only see
    > the message sheet (which tells them they must enable macros to use the wb)
    > and all other sheets will remain hidden. If they enable macros then the above
    > features will work.
    >
    > If someone emails the wb to an outsider then the secret file will not exist
    > at their location. They will not be able to use the wb if macros are enabled
    > or not enabled. Also note that xlVeryHidden worksheets can only be unhidden
    > through the VB Project. The above strategy can only (to my knowledge) be
    > circumvented by breaking the VB Project protection which is likely too
    > difficult for the candidates you refer to.
    >
    > Regards,
    > Greg
    >
    >
    > "THE BIG O" wrote:
    >
    > > I have protected both sheets and workbooks and locked all of cells that need
    > > to be. There there are drop down boxes which provides information based, on
    > > the selection, from the hiddent sheets. Anything that shows to the user
    > > could be seen by a customer or carrier if a branch were to intentionally or
    > > unintentially send it to them. That is why we want do not want to allow the
    > > files to be e-mailed.
    > >
    > > Michael
    > >
    > >
    > > "y_not" wrote:
    > >
    > > >
    > > > Don't know that theres a way to stop someone from emailing spreadsheets
    > > > - even if you could stop them they could simply change the file
    > > > extension; email it then change the file extension back to .xls
    > > >
    > > > Why not just password protect the sheets? You can hide the formulas,
    > > > lock certain cells, recolour text to white (to hide it) etc.
    > > >
    > > > Is this a possibility?
    > > >
    > > >
    > > > --
    > > > y_not
    > > > ------------------------------------------------------------------------
    > > > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > > > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    > > >
    > > >


  7. #7
    Dave Peterson
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    Just some thoughts...

    #1. You're going to have to add some code to the workbook_beforeclose that
    actually saves the workbook with the worksheets displayed the way you want.
    Sometimes it's not a good thing to save a workbook--if the user destroys
    something and wants to close without saving, it could become a problem.

    #3a. The project protection can be broken very quickly. Either by stuff
    available for free on the web or by a commercial password breaker.

    Greg Wilson wrote:
    >
    > You can't prevent someone from emailing it but you can do the following to
    > safeguard the contents:
    >
    > 1. Have wb_close event code that unhides and activates a message sheet and
    > also hides all other sheets (xlVeryHidden). The message sheet simply displays
    > a message that tells users they must enable macros to use the wb. Macros must
    > be enabled for this to work.
    >
    > 2. Have wb_open event code that looks for a secret file on your company's
    > network or on the harddrive of authorized computers. If not found then the wb
    > will give a message to the effect that access is denied and then promply
    > close (you could also include a password override option). Macros must be
    > enabled for this to work.
    >
    > 3. If the above file is found then the wb_open code hides the message sheet
    > and unhides the other sheets. Therefore, the wb opens in a normal state. The
    > user will not see the message sheet.
    >
    > Note that if the user elects not to enable macros then they will only see
    > the message sheet (which tells them they must enable macros to use the wb)
    > and all other sheets will remain hidden. If they enable macros then the above
    > features will work.
    >
    > If someone emails the wb to an outsider then the secret file will not exist
    > at their location. They will not be able to use the wb if macros are enabled
    > or not enabled. Also note that xlVeryHidden worksheets can only be unhidden
    > through the VB Project. The above strategy can only (to my knowledge) be
    > circumvented by breaking the VB Project protection which is likely too
    > difficult for the candidates you refer to.
    >
    > Regards,
    > Greg
    >
    >
    > "THE BIG O" wrote:
    >
    > > I have protected both sheets and workbooks and locked all of cells that need
    > > to be. There there are drop down boxes which provides information based, on
    > > the selection, from the hiddent sheets. Anything that shows to the user
    > > could be seen by a customer or carrier if a branch were to intentionally or
    > > unintentially send it to them. That is why we want do not want to allow the
    > > files to be e-mailed.
    > >
    > > Michael
    > >
    > >
    > > "y_not" wrote:
    > >
    > > >
    > > > Don't know that theres a way to stop someone from emailing spreadsheets
    > > > - even if you could stop them they could simply change the file
    > > > extension; email it then change the file extension back to .xls
    > > >
    > > > Why not just password protect the sheets? You can hide the formulas,
    > > > lock certain cells, recolour text to white (to hide it) etc.
    > > >
    > > > Is this a possibility?
    > > >
    > > >
    > > > --
    > > > y_not
    > > > ------------------------------------------------------------------------
    > > > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > > > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    > > >
    > > >


    --

    Dave Peterson

  8. #8
    THE BIG O
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    Dave, thanks again.

    The spreadsheets/files are going to be accessible via the company intranet.
    We expect the people in the branch locations to hit the link on the intranet
    and the file will open, they will then enter information or choose a
    selection via a drop down menu to get their result. They should then close
    out of the file. The set up will not allow them to do a save because they are
    not the owner of the file. However, if they save to their desktop they can
    do so. I am not sure if the concern about destroying something and saving is
    valid but I am going to pass along all of the information to my IT dept.
    Most likely they have dealt with this situation but I wanted to see if I
    could set it up without taking up their time as they are busy. It now is
    over my head on how to do the coding.

    thanks again

    Michael


    "Dave Peterson" wrote:

    > Just some thoughts...
    >
    > #1. You're going to have to add some code to the workbook_beforeclose that
    > actually saves the workbook with the worksheets displayed the way you want.
    > Sometimes it's not a good thing to save a workbook--if the user destroys
    > something and wants to close without saving, it could become a problem.
    >
    > #3a. The project protection can be broken very quickly. Either by stuff
    > available for free on the web or by a commercial password breaker.
    >
    > Greg Wilson wrote:
    > >
    > > You can't prevent someone from emailing it but you can do the following to
    > > safeguard the contents:
    > >
    > > 1. Have wb_close event code that unhides and activates a message sheet and
    > > also hides all other sheets (xlVeryHidden). The message sheet simply displays
    > > a message that tells users they must enable macros to use the wb. Macros must
    > > be enabled for this to work.
    > >
    > > 2. Have wb_open event code that looks for a secret file on your company's
    > > network or on the harddrive of authorized computers. If not found then the wb
    > > will give a message to the effect that access is denied and then promply
    > > close (you could also include a password override option). Macros must be
    > > enabled for this to work.
    > >
    > > 3. If the above file is found then the wb_open code hides the message sheet
    > > and unhides the other sheets. Therefore, the wb opens in a normal state. The
    > > user will not see the message sheet.
    > >
    > > Note that if the user elects not to enable macros then they will only see
    > > the message sheet (which tells them they must enable macros to use the wb)
    > > and all other sheets will remain hidden. If they enable macros then the above
    > > features will work.
    > >
    > > If someone emails the wb to an outsider then the secret file will not exist
    > > at their location. They will not be able to use the wb if macros are enabled
    > > or not enabled. Also note that xlVeryHidden worksheets can only be unhidden
    > > through the VB Project. The above strategy can only (to my knowledge) be
    > > circumvented by breaking the VB Project protection which is likely too
    > > difficult for the candidates you refer to.
    > >
    > > Regards,
    > > Greg
    > >
    > >
    > > "THE BIG O" wrote:
    > >
    > > > I have protected both sheets and workbooks and locked all of cells that need
    > > > to be. There there are drop down boxes which provides information based, on
    > > > the selection, from the hiddent sheets. Anything that shows to the user
    > > > could be seen by a customer or carrier if a branch were to intentionally or
    > > > unintentially send it to them. That is why we want do not want to allow the
    > > > files to be e-mailed.
    > > >
    > > > Michael
    > > >
    > > >
    > > > "y_not" wrote:
    > > >
    > > > >
    > > > > Don't know that theres a way to stop someone from emailing spreadsheets
    > > > > - even if you could stop them they could simply change the file
    > > > > extension; email it then change the file extension back to .xls
    > > > >
    > > > > Why not just password protect the sheets? You can hide the formulas,
    > > > > lock certain cells, recolour text to white (to hide it) etc.
    > > > >
    > > > > Is this a possibility?
    > > > >
    > > > >
    > > > > --
    > > > > y_not
    > > > > ------------------------------------------------------------------------
    > > > > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > > > > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    > > > >
    > > > >

    >
    > --
    >
    > Dave Peterson
    >


  9. #9
    Dave Peterson
    Guest

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    I guess my real point is that no matter what you do, you can't make that excel
    file safe from distribution.



    THE BIG O wrote:
    >
    > Dave, thanks again.
    >
    > The spreadsheets/files are going to be accessible via the company intranet.
    > We expect the people in the branch locations to hit the link on the intranet
    > and the file will open, they will then enter information or choose a
    > selection via a drop down menu to get their result. They should then close
    > out of the file. The set up will not allow them to do a save because they are
    > not the owner of the file. However, if they save to their desktop they can
    > do so. I am not sure if the concern about destroying something and saving is
    > valid but I am going to pass along all of the information to my IT dept.
    > Most likely they have dealt with this situation but I wanted to see if I
    > could set it up without taking up their time as they are busy. It now is
    > over my head on how to do the coding.
    >
    > thanks again
    >
    > Michael
    >
    > "Dave Peterson" wrote:
    >
    > > Just some thoughts...
    > >
    > > #1. You're going to have to add some code to the workbook_beforeclose that
    > > actually saves the workbook with the worksheets displayed the way you want.
    > > Sometimes it's not a good thing to save a workbook--if the user destroys
    > > something and wants to close without saving, it could become a problem.
    > >
    > > #3a. The project protection can be broken very quickly. Either by stuff
    > > available for free on the web or by a commercial password breaker.
    > >
    > > Greg Wilson wrote:
    > > >
    > > > You can't prevent someone from emailing it but you can do the following to
    > > > safeguard the contents:
    > > >
    > > > 1. Have wb_close event code that unhides and activates a message sheet and
    > > > also hides all other sheets (xlVeryHidden). The message sheet simply displays
    > > > a message that tells users they must enable macros to use the wb. Macros must
    > > > be enabled for this to work.
    > > >
    > > > 2. Have wb_open event code that looks for a secret file on your company's
    > > > network or on the harddrive of authorized computers. If not found then the wb
    > > > will give a message to the effect that access is denied and then promply
    > > > close (you could also include a password override option). Macros must be
    > > > enabled for this to work.
    > > >
    > > > 3. If the above file is found then the wb_open code hides the message sheet
    > > > and unhides the other sheets. Therefore, the wb opens in a normal state. The
    > > > user will not see the message sheet.
    > > >
    > > > Note that if the user elects not to enable macros then they will only see
    > > > the message sheet (which tells them they must enable macros to use the wb)
    > > > and all other sheets will remain hidden. If they enable macros then the above
    > > > features will work.
    > > >
    > > > If someone emails the wb to an outsider then the secret file will not exist
    > > > at their location. They will not be able to use the wb if macros are enabled
    > > > or not enabled. Also note that xlVeryHidden worksheets can only be unhidden
    > > > through the VB Project. The above strategy can only (to my knowledge) be
    > > > circumvented by breaking the VB Project protection which is likely too
    > > > difficult for the candidates you refer to.
    > > >
    > > > Regards,
    > > > Greg
    > > >
    > > >
    > > > "THE BIG O" wrote:
    > > >
    > > > > I have protected both sheets and workbooks and locked all of cells that need
    > > > > to be. There there are drop down boxes which provides information based, on
    > > > > the selection, from the hiddent sheets. Anything that shows to the user
    > > > > could be seen by a customer or carrier if a branch were to intentionally or
    > > > > unintentially send it to them. That is why we want do not want to allow the
    > > > > files to be e-mailed.
    > > > >
    > > > > Michael
    > > > >
    > > > >
    > > > > "y_not" wrote:
    > > > >
    > > > > >
    > > > > > Don't know that theres a way to stop someone from emailing spreadsheets
    > > > > > - even if you could stop them they could simply change the file
    > > > > > extension; email it then change the file extension back to .xls
    > > > > >
    > > > > > Why not just password protect the sheets? You can hide the formulas,
    > > > > > lock certain cells, recolour text to white (to hide it) etc.
    > > > > >
    > > > > > Is this a possibility?
    > > > > >
    > > > > >
    > > > > > --
    > > > > > y_not
    > > > > > ------------------------------------------------------------------------
    > > > > > y_not's Profile: http://www.excelforum.com/member.php...o&userid=19947
    > > > > > View this thread: http://www.excelforum.com/showthread...hreadid=531978
    > > > > >
    > > > > >

    > >
    > > --
    > >
    > > Dave Peterson
    > >


    --

    Dave Peterson

  10. #10
    Registered User
    Join Date
    12-24-2015
    Location
    Salt Lake, Utah
    MS-Off Ver
    10
    Posts
    3

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    14 years later, just in case someone else stumbles across this:

    I ran into a similar issue, and there isn't a super secure way because any computer savvy person can just disable passwords and protection, access the VBA editor, disable its password, and do whatever they want.

    My proposed solution was to implement a file package similar to the above, but to keep all the database access off the excel sheet, and encrypted. Essentially, the database connection string is just stored in a hidden text file, encrypted by an AES VBA module, and then the whole thing is decrypted at runtime IF the user has the correct files on their computer and the decryption module with the correct cipher.

    It's not perfect because brute force is always possible, but if the sensitive information is stored externally in an add-in or downloadable folder and then only accessed by the Excel file, the client would get a useless workbook because the core functionality is stored elsewhere. The only way I think this would really fail is if someone zipped up all of the dependencies and sent them along with the workbook.

    If this seems like an incorrect approach (Or there's some vulnerability I'm not aware of, please let me know! Otherwise, this should hopefully help someone out in the same boat.

    AES Encryption/Decryption module I built off of: Search Github for JonTheNiceGuy and his gist called "COMBINED TESTING" (I can't post links here, apparently).

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    44,003

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    As a new member, you can't post links, but I m not sure you've read our rules. If you had, this should have caught your eye:

    11. Do not put links to personal sites or services as your sole contribution here on the forum. (B)
    You are on a knife edge with this post - please don't promote yourself any further. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  12. #12
    Registered User
    Join Date
    12-24-2015
    Location
    Salt Lake, Utah
    MS-Off Ver
    10
    Posts
    3

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    I hope this is auto-generated, because I neither promoted myself, nor anyone else. Even if I had, it isn't even in violation of the rule, which says, "11. Do not put links to personal sites or services as your sole contribution here on the forum." (Emphasis added)

    My contribution was a suggested working solution and a link to someone else's free source code to give subsequent readers a place to start. Sounds like you haven't read your own rules either, or that might have caught your eye.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    44,003

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    As I said, on a knife edge - bear in mind that all we have is three posts from you. A warning shot - nothing more, nothing less.

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,436

    Re: Preventing someone from e-mailing an Excel spreadsheet?

    Quote Originally Posted by clove511 View Post
    I hope this is auto-generated, because I neither promoted myself, nor anyone else. Even if I had, it isn't even in violation of the rule, which says, "11. Do not put links to personal sites or services as your sole contribution here on the forum." (Emphasis added)

    My contribution was a suggested working solution and a link to someone else's free source code to give subsequent readers a place to start. Sounds like you haven't read your own rules either, or that might have caught your eye.
    Thanks for the suggestion

    No that was not an auto-generated reply, Ali typed it all by herself

    Her reason for moderating your post was due to your links to other sites. Where paid for or not, we would appreciate if you earned your stripes here on the forum before including links or suggestions to other sites.

    Thanks
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed 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