Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Secure Workbook

Hi

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

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

* I was wondering if there was piece of code that will automatically close the VB Editor if the current workbook is active. 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

* Is there a piece of code that will disable the 'Save' button on the 'Standard' toolbar? I've disabled the toolbar and reset all the Save key combos, but if the user makes a custom toolbar with the Save button on it, then they'll be able to save the workbook..

* 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

I sound so pedantic don't I? =) Well, I hope there is code that will allow these to be done, and thankyou for helping me out

SuperJas.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Secure Workbook

"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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i password secure a workbook when i send it via e-mail AN Excel Discussion (Misc queries) 6 April 2nd 08 11:17 PM
Distribute a secure Workbook scott56hannah Excel Discussion (Misc queries) 1 June 25th 07 02:09 PM
Excel 2007 - Secure workbook with password Carlos Correia Excel Discussion (Misc queries) 12 December 8th 06 05:42 PM
Secure spreadsheet Don Grover Excel Discussion (Misc queries) 1 November 26th 06 09:33 PM
Secure Information Michael Link Excel Discussion (Misc queries) 0 March 7th 06 04:03 PM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"