• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 93
  • Last Modified:

Excel security within my domain

im looking for a way to prevent user opening an excel file from outside my domain.
or send an email each time they open the document

What do you think ?
Victor Charpentier
Victor Charpentier
1 Solution
JPIT DirectorCommented:
It would only be as secure as vba security is. You could put a statement in vba code workbook_open checking for your domain like

if environ("userdomain") <> yourdomain then
activeworkbook. close
end if
[ fanpages ]IT Services ConsultantCommented:

im looking for a way to prevent user opening an excel file from outside my domain.
or send an email each time they open the document

I would say you cannot unless you strictly control the usage of the workbook inside your organisation & do not allow anybody to use removable hard drives/memory sticks, floppy disks, writable media of any other description, &/or e-mail messages (attachments, or text) to anybody outside of the organisation.  Also disabling any printing & computer-integrated electronic facsimile transmissions is necessary.

Adding a workbook-level password to the workbook just gets in the way inside the organisation, & once the password is known to somebody (else) then that party has all the control over the content that they require to share it outside of your control.

For example, if somebody was that way inclined, they could e-mail an ASCII text description of the content of the workbook & reproduce it elsewhere.

A workbook, worksheet-specific, &/or a Visual Basic for Applications [VBA] project password can be overcome given enough time.

Relying on VBA code to restrict access is only useful if the person opening the workbook allows the code to execute automatically (with the lowest security level setting).  Any other security setting will simply halt the code executing & allow the user the ability to gain entry to the workbook without the need for a password.

Commercially-available programs to remove passwords from workbooks, worksheets, &/or VB[A] projects could also be used.


E-mailing upon opening also relies upon Visual Basic for Applications code.
Automatic sending of a message also assumes the environment where the workbook is opened either allows this, has an e-mail application installed, &/or has a connection to a mail server/the Internet at that time.

Disabling a WiFi connection, 3G (cellular communications), &/or Local Area Network (cable-based) traffic at any time will mean no e-mail is sent.


The only way to safely protect your "intellectual property" is to remove all the content you wish to protect & produce a standalone application written outside of the Microsoft Office environment.


Martin LissOlder than dirtCommented:
I've requested that this question be closed as follows:

Accepted answer: 500 points for peetjh's comment #a39490609

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now