Thread: Secure Workbook
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alex J Alex J is offline
external usenet poster
 
Posts: 85
Default Secure Workbook

To Harlan' s comments - "Amen".

SJ
If you need to give your customer something, perhaps a "static" report of
what your "dynamic" workbook produces?
It's easy enough to generate, smaller, and reduces opportunity for medling.

Alex J
(My 2 cents. Your cost - free)


"Harlan Grove" wrote in message
...
"SuperJas" wrote...
I'm preparing an information-sensitive spreadsheet that will be sent
out to our customers, and wish to protect the workbook from any
deliberate/accidental changes.


To be brief, Excel provides nothing that would prevent determined and
knowledgeable people from breaking into workbooks. Passwords needed to

open
files are relatively secure, but can be broken by brute force attack - if
the person trying to do so has sufficient patience. Workbook and worksheet
protection passwords are only meant to discourage the relatively unskilled
and/or innocent exploration.

So I am placing the protection code within a Workbook_Activate() event.
I have 3 main issues left:


Why not save the workbook with worksheet and workbook protection enabled?

* I was wondering if there was piece of code that will automatically
close the VB Editor if the current workbook is active. . . .


No. If there were, it'd be impossible to fix some bugs in open events.
Anyway, it's easy to turn off macros, but with macros turned off, it's

still
possible to open the VB Editor.

. . . If not, the average user could simply run their own macro to,
for example, enable some menu items that I've deliberately disabled.
I have already reset the 'ALT + F11' key combo and disabled the Tools
menu, but without this piece of code, users can simply open the VB
Editor before opening my workbook, and then undo any protection there.


Yup. To repeat, Excel provides nothing that would prevent determined and
knowledgeable people from breaking into workbooks.

* Is there a piece of code that will disable the 'Save' button on the
'Standard' toolbar? . . .


You could try adding a BeforeSave event handler that would do nothing more
than set Cancel to True and exit, thus aborting the save. But it relies on
macros being enabled, so easy to defeat.

* Is there any way I can disable the User's custom Add-Ins (and then
reactivate them when the workbook is deactivated). A clever user could
think to assign their 'unprotect' macro as an add-in, and then run it
on the workbook. . . .


And why do you think this knowledgeable but hostile user wouldn't be able

to
figure out how to undo your secondary, tertiary and further attempts at
protection? There's no robust way to secure an Excel file that a user can
open.

Even if you could do this in Excel, if users could still manage screen
prints, they could harvest all the information in your workbook and
manipulate or change it to their hearts' content.

If you don't trust your customers and you don't need to give them
information in order to retain them as customers, don't give them
information. If you need to give them information, then nondisclosure
statements and other legal agreements make more sense than trying

mechanical
and easily overcome document protection.

The only thing Excel's protection mechanisms provide is protection against
inadvertent user actions. If that meets your needs, you don't need to

worry
about anything more than worksheet and workbook protection. If that

doesn't
meet your needs, Excel isn't a good choice of application or document

format
to use to distribute this information.