Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

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
Expire count down Sweetie[_2_] Excel Worksheet Functions 5 September 19th 08 05:02 AM
Setting a date for a workbook to expire dave.d71 Excel Discussion (Misc queries) 4 June 4th 08 09:09 PM
Conditional formatting dates due to expire Allan Skyner Excel Discussion (Misc queries) 2 December 10th 07 02:54 PM
Having Data in Fields Expire. (Excel) RussellC Excel Discussion (Misc queries) 1 March 22nd 07 05:05 PM
expire workbook alldreams Excel Programming 1 April 9th 04 04:52 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"