LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Excel file security

I think that the original poster had the idea of setting security to
low when he is physicaly sitting at their computer "installing" the
file (reading that disk ID number). This would work for a client who is
*extremely* naive - but would be quite unethical (especially when done
to inexperienced users who would need the security umbrella the most).
It is possible to be a little more devious and a little more ethical at
the same time:
1) Get the client to set their security setting to medium - and tell
them to enable the macros whenever they open the file

2) Add some macros that are *essential* to the functioning of the
workbook - and not just essential to the non-copy ploy. This could be
achieved by doing nothing in a clever way - replacing some crucial
worksheet functions by dummy user-defined functions which do nothing
more than pass their parameters to the appropriate.
Application.WorksheetFunction. You can even give these functions
impressive sounding names if you want to throw a little bit of
marketing into the mix.

3) Password-protect the code so they can't tell what the macros are
*really* up to.

I still have some ethical qualms about that - but it would be a heck of
a lot nicer than turning off security altogether on the unsuspecting.

-semiopen

Tom Ogilvy wrote:
for the Original Poster:

And I did try your code and it worked well until I disabled macros. then it
opened and I was free to do whatever I wanted.

Also, many places just set the security to High. In that case, not only
won't the realize you have such a macro in your workbook, it won't even run,
since macros are silently disabled for uncertified macros.

so they will freely share with their friends and never even know that the
workbook shouldn't open.

And as semiopen said, Security is set at the application level and stored
in the registry - not in the workbook. Code in a workbook can not change the
security setting when it is opening.

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
If DiskVolumeId("C:") < "E06F-9984" Then
msgbox "a serious error has occured. Call Berj at 555-5555 for
help"
Wb.Close savechanges:=False
End If
End Sub

--
Regards,
Tom Ogilvy



"semiopen" wrote:


Berj wrote:
Dear Mr. Tom,

This is my second message to you.
I just realized what you meant by "disabling macros".
I am going to put the file in "low security", so it will just open the file
or not open the file.
As I told you before, the place I live, nobody knows of these things.

Best Regards,
Berj


But - security settings don't reside in the file - they reside in the
application and are not low by default.

-semiopen



 
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
File security Excel encryption Trish Smith Excel Discussion (Misc queries) 0 January 18th 09 06:04 PM
Excel 2007 .xlsm file. Macro Security options not available. JP Excel Discussion (Misc queries) 1 July 17th 08 04:04 PM
Security warning when saving downloaded file from Excel codearchitect Excel Discussion (Misc queries) 3 April 5th 07 01:37 AM
Help! Security when using a VBA macro to access an Excel File biker Excel Programming 0 June 16th 06 05:27 AM
Security discussion - how to effectively distribute an Excel file Rémi Excel Programming 4 May 4th 06 05:42 AM


All times are GMT +1. The time now is 06:45 PM.

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

About Us

"It's about Microsoft Excel"