ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to protect a workbook? (https://www.excelbanter.com/excel-programming/385561-how-protect-workbook.html)

[email protected]

How to protect a workbook?
 

Hello

I would like to know what would be the best way to protect a
workbook(not the routine protect workbook), so that the workbook
becomes ineffective or uneditable if copied into any other
computer(even through LAN) or harddisk.

Only the author of the workbook should have the rights to copy the
workbook into another hardidsk or computer.

Can anyone suggest a way to do this?
Thanks
Rajesh


Mike

How to protect a workbook?
 
Any way you do this you will ultimately have to rely on the protection within
the workbook and as we are probably agreed there is little protection
available there.

However, one way is to have the workbook check for the existance of a file
which is only present on the authors drive, if the file isn't there then the
workbook simply closes. Code such as:-

Private Sub Workbook_Open()
If Dir("c:\trial.txt") < "" Then
MsgBox ("OK to run")
Else
ActiveWorkbook.Close savechanges:=False 'close application
End If
End Sub

However, as stated the main drawback is that anyone even moderately
determined would be able to break into your code and check what you were
doing and defeat it. If it was easy there wouldn't be so much pirate software
about.

Mike

" wrote:


Hello

I would like to know what would be the best way to protect a
workbook(not the routine protect workbook), so that the workbook
becomes ineffective or uneditable if copied into any other
computer(even through LAN) or harddisk.

Only the author of the workbook should have the rights to copy the
workbook into another hardidsk or computer.

Can anyone suggest a way to do this?
Thanks
Rajesh



[email protected]

How to protect a workbook?
 
On Mar 19, 6:05 pm, Mike wrote:
Any way you do this you will ultimately have to rely on the protection within
the workbook and as we are probably agreed there is little protection
available there.

However, one way is to have the workbook check for the existance of a file
which is only present on the authors drive, if the file isn't there then the
workbook simply closes. Code such as:-

Private Sub Workbook_Open()
If Dir("c:\trial.txt") < "" Then
MsgBox ("OK to run")
Else
ActiveWorkbook.Close savechanges:=False 'close application
End If
End Sub

However, as stated the main drawback is that anyone even moderately
determined would be able to break into your code and check what you were
doing and defeat it. If it was easy there wouldn't be so much pirate software
about.

Mike



" wrote:

Hello


I would like to know what would be the best way to protect a
workbook(not the routine protect workbook), so that the workbook
becomes ineffective or uneditable if copied into any other
computer(even through LAN) or harddisk.


Only the author of the workbook should have the rights to copy the
workbook into another hardidsk or computer.


Can anyone suggest a way to do this?
Thanks
Rajesh- Hide quoted text -


- Show quoted text -



Hello Mike

Thanks for the input.
Yeah i know that it is not easy
This is required so that the data is protected properly and no one
unauthorised meddles with the data without having the rights to do
it.
I am still looking for something more protective
Neways thanks a ton for your suggestion.



All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com