ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cause Macro to Expire (https://www.excelbanter.com/excel-programming/366983-cause-macro-expire.html)

MillMaster[_2_]

Cause Macro to Expire
 

Is there a quick way I can cause a macro to expire after a certain time
period? I really don’t want to get into a lot of complicated
copy-protection type stuff if I can avoid it.
I basically have a partially protected sheet that allows users to enter
in data, and then run a macro using an on-sheet button. I would like to
set it up so that after say, 30 days, the macro will not run anymore.
Any quick fixes for a teacher that wants to keep it simple. (I have
seen sites that sell code for such things, but this is just a courtesy
for my students who bring laptops to class)


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile: http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724


Die_Another_Day

Cause Macro to Expire
 
Sub YourSub()
If Data 8/12/2006 Then Exit Sub
'YourCode
End Sub

HTH

Die_Another_Day
"MillMaster" wrote
in message ...

Is there a quick way I can cause a macro to expire after a certain time
period? I really don't want to get into a lot of complicated
copy-protection type stuff if I can avoid it.
I basically have a partially protected sheet that allows users to enter
in data, and then run a macro using an on-sheet button. I would like to
set it up so that after say, 30 days, the macro will not run anymore.
Any quick fixes for a teacher that wants to keep it simple. (I have
seen sites that sell code for such things, but this is just a courtesy
for my students who bring laptops to class)


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile:
http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724




MillMaster[_3_]

Cause Macro to Expire
 

Yeah, I figured as much, but tell me, If they reset the date in windows,
then it will work again, right?


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile: http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724


Dave Peterson

Cause Macro to Expire
 
Maybe...

If Date dateserial(2006,8,12) Then Exit Sub



Die_Another_Day wrote:

Sub YourSub()
If Data 8/12/2006 Then Exit Sub
'YourCode
End Sub

HTH

Die_Another_Day
"MillMaster" wrote
in message ...

Is there a quick way I can cause a macro to expire after a certain time
period? I really don't want to get into a lot of complicated
copy-protection type stuff if I can avoid it.
I basically have a partially protected sheet that allows users to enter
in data, and then run a macro using an on-sheet button. I would like to
set it up so that after say, 30 days, the macro will not run anymore.
Any quick fixes for a teacher that wants to keep it simple. (I have
seen sites that sell code for such things, but this is just a courtesy
for my students who bring laptops to class)


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile:
http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724


--

Dave Peterson

Harald Staff

Cause Macro to Expire
 
Yes. But people go to that trouble only to try to get extended access to
valuable software or to really really good code. Be humble, my friend, few
are in that league.

Also, if something suddenly mysteriously doesn't work for you, how high on
your list of things to try is to change the system date back ? The solution
does not mention that a date check is performed, it just doesn't work
anymore.

Best wishes Harald


"MillMaster" skrev
i melding ...

Yeah, I figured as much, but tell me, If they reset the date in windows,
then it will work again, right?


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile:

http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724




MillMaster[_4_]

Cause Macro to Expire
 

Yes, I guess I am to use to the extensive copy protection implemented by
big software co's. However, the macro does contain some advanced
formulas used in the petro-chemical industry that I would like to try
to keep disabled if possible. The other thing is, that the formulas I
use are for teaching, and don’t take into account other real life
variables, and if a student took this sheet to a refinery and tried to
use it for real-life applications, the results could be disastrous.

Anyway, thanks for all your help guys. Just curious, what would my next
step be if I wanted to go one step beyond the date X/X/X code?


--
MillMaster
------------------------------------------------------------------------
MillMaster's Profile: http://www.excelforum.com/member.php...o&userid=36292
View this thread: http://www.excelforum.com/showthread...hreadid=560724



All times are GMT +1. The time now is 05:24 PM.

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