ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Timebomb protection of Code (https://www.excelbanter.com/excel-programming/365264-timebomb-protection-code.html)

Frans Verhaar

Timebomb protection of Code
 
Hi,

I am writing a little VBA application and will sell this to a small company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if
somebody tries to break into the code?

Regards,
Frans



Ron de Bruin

Timebomb protection of Code
 
Hi Frans

There is always a way to use your workbook if anybody wants it.
VBA is not safe.

Be sure that your workbook is only usefull if they enabled macro's

But most people you can fool with something like this that close the workbook
after the date.

Put this in the workbook open event of the workbook.
After the date the file will be closed when you open it.

Private Sub Workbook_Open()
If Date DateSerial(2003, 4, 1) Then
ThisWorkbook.Close savechanges:=False
End If
End Sub

This you can use to kill the file

Private Sub Workbook_Open()
If Date DateSerial(2003, 4, 1) Then
ThisWorkbook.ChangeFileAccess xlReadOnly
Kill ThisWorkbook.FullName
ThisWorkbook.Close False
End If
End Sub


--
Regards Ron De Bruin
http://www.rondebruin.nl



"Frans Verhaar" wrote in message ...
Hi,

I am writing a little VBA application and will sell this to a small company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if somebody tries to break into the code?

Regards,
Frans





RB Smissaert

Timebomb protection of Code
 
Simplest way to make it foolproof is put some or most of the code in a VB6
ActiveX dll and
make all the functions/subs exit with a message when it is past the date.
Any protection that relies on VBA code is very easy to crack.

RBS


"Frans Verhaar" wrote in message
...
Hi,

I am writing a little VBA application and will sell this to a small
company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if
somebody tries to break into the code?

Regards,
Frans




Frans Verhaar

Timebomb protection of Code
 
I am not afraid of that.
The fact that they hire me to write this relatively simple code, means that
they will probably not be able to crack it themselves, let alone receive any
additional support from me...

However,
Is there not a code that on a workbok open event can delete all code in VBA
when it is past a certain date, and than save the workbook immediately?

It is like an auto destruct. How would I formulate such an auto delete of
code / modules?

Regards,
Frans



"RB Smissaert" wrote in message
...
Simplest way to make it foolproof is put some or most of the code in a VB6
ActiveX dll and
make all the functions/subs exit with a message when it is past the date.
Any protection that relies on VBA code is very easy to crack.

RBS


"Frans Verhaar" wrote in message
...
Hi,

I am writing a little VBA application and will sell this to a small
company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if
somebody tries to break into the code?

Regards,
Frans






Ron de Bruin

Timebomb protection of Code
 
Have you try my code example Frans ?

--
Regards Ron De Bruin
http://www.rondebruin.nl



"Frans Verhaar" wrote in message ...
I am not afraid of that.
The fact that they hire me to write this relatively simple code, means that they will probably not be able to crack it themselves,
let alone receive any additional support from me...

However,
Is there not a code that on a workbok open event can delete all code in VBA when it is past a certain date, and than save the
workbook immediately?

It is like an auto destruct. How would I formulate such an auto delete of code / modules?

Regards,
Frans



"RB Smissaert" wrote in message ...
Simplest way to make it foolproof is put some or most of the code in a VB6 ActiveX dll and
make all the functions/subs exit with a message when it is past the date.
Any protection that relies on VBA code is very easy to crack.

RBS


"Frans Verhaar" wrote in message ...
Hi,

I am writing a little VBA application and will sell this to a small company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if somebody tries to break into the code?

Regards,
Frans








Ron de Bruin

Timebomb protection of Code
 
See also
http://www.cpearson.com/excel/vbe.htm


--
Regards Ron De Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Have you try my code example Frans ?

--
Regards Ron De Bruin
http://www.rondebruin.nl



"Frans Verhaar" wrote in message ...
I am not afraid of that.
The fact that they hire me to write this relatively simple code, means that they will probably not be able to crack it
themselves, let alone receive any additional support from me...

However,
Is there not a code that on a workbok open event can delete all code in VBA when it is past a certain date, and than save the
workbook immediately?

It is like an auto destruct. How would I formulate such an auto delete of code / modules?

Regards,
Frans



"RB Smissaert" wrote in message ...
Simplest way to make it foolproof is put some or most of the code in a VB6 ActiveX dll and
make all the functions/subs exit with a message when it is past the date.
Any protection that relies on VBA code is very easy to crack.

RBS


"Frans Verhaar" wrote in message ...
Hi,

I am writing a little VBA application and will sell this to a small company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3 months?

And how can I program something that will clear the whole VBA code if somebody tries to break into the code?

Regards,
Frans










Harald Staff

Timebomb protection of Code
 
Hi Frans

By legal default, the one (person/company/...) that pays you to write the
code, is the owner the code. Not the author/programmer. If you sell time or
labor then you do not own the code you write. So make sure your agreement
with your customer makes you the owner and allows you to put time bombs into
it if you choose that approach.

Best wishes Harald

"Frans Verhaar" skrev i melding
...
I am not afraid of that.
The fact that they hire me to write this relatively simple code, means

that
they will probably not be able to crack it themselves, let alone receive

any
additional support from me...

However,
Is there not a code that on a workbok open event can delete all code in

VBA
when it is past a certain date, and than save the workbook immediately?

It is like an auto destruct. How would I formulate such an auto delete of
code / modules?

Regards,
Frans



"RB Smissaert" wrote in message
...
Simplest way to make it foolproof is put some or most of the code in a

VB6
ActiveX dll and
make all the functions/subs exit with a message when it is past the

date.
Any protection that relies on VBA code is very easy to crack.

RBS


"Frans Verhaar" wrote in message
...
Hi,

I am writing a little VBA application and will sell this to a small
company.
However, I want to give them a license to use it only for 3 months.
How can I make sure the application will not work anymore after 3

months?

And how can I program something that will clear the whole VBA code if
somebody tries to break into the code?

Regards,
Frans









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

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