stop programe after trial use

A

alexanderd

how can i inhibt a programe to work for so long and stop working after
months trial, or the oposite to continue working if a specified key i
use
 
S

Simon Lloyd

Dont know much about this but, if on the first worksheet (you will hav
to select it in the auto open) on a cell out of the way you ente
=TODAY(), then format the cell by choosing number, custom and the
enter ;;; the date will be hidden, then in the auto open you will nee
something like If "A2">{enter date range here} The
workbook.protect=True.....you would have to add your own VBA passwor
and then protect the VBA from being viewd or changed.

I see it like this....if you did something like the above the whol
workbook would be locked after the certain date you could always put
msgbox "Contact Vendor, Trial Period is Over" in the auto open if th
date criteria is true.

Hope this helps....sorry not really any good at writing code...mayb
someone else can help you with the concept!

Simon
 
A

alexanderd

thank you for your response.
i had thought along the same lines but because the sheet is over
written each time it is opened i.e. refreshed it would not work and is
a possible non starter.
having said that i will try it out tommorow with some data thrown in.
 
S

Simon Lloyd

You could psosibly in the auto open code add a counter for every tim
the workbook is opened and limit it this way say 2 months = 80 open
then when COUNT=80 workbook.protect

Or something like that, cos ur code is never refreshed!

Simon

Good luck
 
J

JE McGimpsey

You can search the archives:


using "expire workbook" as keywords, but the bottom line is that there's
just about no way in XL to really prevent an even slightly ambitious
user from bypassing any protection you put in.

Worksheet protection is a joke, macro protection can be removed by
commercial crackers, so any VBA you put in is vulnerable to anyone with
the gumption to, say, read these newsgroups.

You'll get better security if you make your application a compiled
add-in, but even then you'll need to be careful that simply setting the
machine's clock back, or deleting a hidden file, or changing/removing a
registry setting, won't reset your app.
 
J

JE McGimpsey

That will certainly work to keep newbies honest. Perhaps even the
moderately adept, IF it's in a compiled add-in. Bypassing VBA protection
is trivial, so the code can't be in a regular VBA module.

For instance, in a non-compiled app it would be easy to change only one
value to give a ten year extension to the trial, e.g., bypass the VBA
password and change

If Not DateGood(30) Then

to

If Not DateGood(3660) Then


The biggest problem with it when compiled is that deleting the register
entries resets the trial period for another X days.
 
Top