Stopping a macro from executing after a length of time has past.

E

Ed

Hi
I made a game on an Excel spreadsheet that will automatically play one hand
after the other continuously.
I need it to automatically stop after playing a
certain number of hands and then you are unable to play any more.
This is all working fine.
The problem is, you are able to reload the original file from the
harddrive and play the same certain number of hands again and again.

How do I stop this (being able to reload the origanal file from the
harddrive and playing addional hands on the new copy)?

Or would it be easier to have the limiting factor be a certain number of
days (say after 5 days the game ceases to work, even when loaded into Excel
from the harddrive?).
The problem is stopping the macro (the one in the new copy that was newly
loaded from the harddrive) from executing.

Either way, how is it done?

Thankyou
Ed
 
K

K Dales

You have run across the whole problem with copy protection. As long as users
are free to make copies of the original file (which has no way of knowing
they have already been using it) there is no way to prevent them from using
it over and over again. You would need to do what the software companies
have done: implement some form of copy protection and registration. Copy
protection to prevent unauthorized users from recopying the file, and
registration to verify that a particular user now has full rights to the
file. Will not comment on how best to implement this because MSOffice
built-in capabilities for this are limited and not totally secure, would need
at least the developers edition for better protection of source files.
 
V

Vacation's Over

I remember seeing a good self-destruct but can't seem to locate it.

Process was something like this

on launch the VBA project (long password protected) creates a new file and
adds code to the new file passing also the full path to the first project
then it calls that new code
That code checks date compared to a set Date
if to old
the new code kills the old (it has path) and then posts message that time is
expired

it is still not hack proof but doesn't sound like you are locking fort Knox
either.

If you do write it pls post it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top