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 CharpentierIt technicianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
[ 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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.