View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] gimme_this_gimme_that@yahoo.com[_2_] is offline
external usenet poster
 
Posts: 236
Default How to disable a workbook?

Yes, you could implement your idea.

But if the data is sensitive Excel is not the tool for the job.

Any experienced Excel developer can get around tricks and
obfuscations.

In that sense what you want to do can't be done.

For what you described a user can open the Workbook with the shift key
pressed and rip out the code you added that prompts for a password.

Other tricks I can think of:

1. Setting font color to white
2. Validating the user against Active Directory (so if they aren't on
the network you can take some sort of VBA action)
3. I'd have to check - but I think you could use CDO to send an email
message without the user's knowledge. (This is my favorite because the
email message that's sent can provide information about the user's
identity and what he's trying to do.)
4. Putting key VBA Modules and data Sheets into AddIns
5. Only distribute Templates instead of Worksheets and modify the
templates to fetch data from a database - prompt the user with
credentials to log in to the database
6. Store key data Sheets in Visual Basic DLLs
7. As a general rule - keep business logic in database functions and
procedures - that makes it so someone can steal the data - but they
can't steal the business logic