View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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