View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default How to time-limit an Excel file installation

I've never actually done it but this would likely be my approach. Not to
imply that this is very secure. Just the best I can think of using Excel and
VBA.

I think I would have code executed with the Workbook_Open event that looks
for a cookie (text file). If it doesn't exist, then the code creates it
(requires just one line of code). The user must not be aware of this file.
Each time the workbook is opened, the date and time are logged to the file.
If the current date minus the first date logged exceeds the time limit ***or
if the date/time ever goes in reverse*** then have code that advises that the
trial period has expired yada yada yada.

Note that the system date and time are easliy backdated. Just double click
the time display at the bottom-right of your screen in the task bar and set
it to whatever you like. Doing this allows the user to perpetually use your
wb if you just compare first use vs. the current (system) date. That's why I
would check to see if it ever goes in reverse, then terminate use of the wb.
Also, if you instead just track usage in the wb itself, this is easily
circumvented by making a copy before it expires and just perpetually use
copies of this. In my case, all copies would look for the cookie and always
find it, and thus not recreate it.

Note that all of the above assumes that macros are enabled. My projects
always include a lot of code and I would consider the code as the proprietory
product. Disabling macros in my case would make the wb of limited value. When
the user decides to buy your full version, it should delete the cookie.

Just my $0.02 worth.

Regards,
Greg


"Colin Hayes" wrote:


Hi

I need to have an excel file 'expire' 3 months after first installation.
Is it possible to build something into the program so that it will read
the date on first use and stop functioning after a set time , perhaps
with a popup too?

Any help appreciated.


Thanks