View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NDBC NDBC is offline
external usenet poster
 
Posts: 204
Default Need VBA code to make app expire after period of time

I just tried this and it worked

If Now() "20/08/2009 3:32pm" Then

but

If Now() "20/08/2009 15:32" Then

didn't work.



"NDBC" wrote:

At the start of the sub put something like

If Now() "date and time" Then
Exit Sub

Else

'the rest of you sub goes here as normal.

My only concern is I'm not sure how to put in the date and time that you
want finish at. Another alternative is to put the date time in cell AA1

If Now() Sheets("Sheet1").Range("AA1") Then
Exit Sub

Else

'the rest of you sub goes here as normal.


Hope this helps you get on track anyway.

"TJ" wrote:

Can someone provide some sample code or reference to make an
application expire after a period of time.

Thanks.