Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Stopping a macro from executing after a length of time has past.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Stopping a macro from executing after a length of time has past.

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.
--
- K Dales


"Ed" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Stopping a macro from executing after a length of time has past.

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

"Ed" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Length of time from date/time custom format Andrew Excel Discussion (Misc queries) 2 September 21st 09 04:20 PM
Check if a time is past a certain time Savio Excel Discussion (Misc queries) 3 January 31st 09 10:21 PM
Stopping windows installer from popping up all the time Steve Excel Discussion (Misc queries) 0 January 19th 06 12:22 PM
Run-time error -2147319784 (80028018) when executing a simple macr Jean-Marc[_2_] Excel Programming 1 June 24th 05 05:44 PM
Need Help with executing a function based on time. Bcoop Excel Programming 1 October 5th 04 11:26 PM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"