PC Review


Reply
Thread Tools Rate Thread

Date check for expiration

 
 
A
Guest
Posts: n/a
 
      14th Apr 2007
Hello,
I'd like to insert a simple protection into my Excel file. For example
I'd like to

-check the current DATE that file is opened
-if it is opened after a particular date the applications quits.

Ok, I now is very easy to unprotect but it's better that no protection
at all. (and I know
they can disable macro at start)

Something like this doesn't work:


Sub Apri_Open()

If Date > Worksheets("foglio1").Range("A1") Then
MsgBox ("expired")
ThisWorkbook.Close
End If
End Sub

Because date() returns the time also.

Thanks,
Ale.

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      14th Apr 2007
The Date method doesn't return the time. It returns only the Date. Time
returns only the Time, and Now returns both.

What's in foglio1!A1?



In article <(E-Mail Removed)>,
"A" <(E-Mail Removed)> wrote:

> Hello,
> I'd like to insert a simple protection into my Excel file. For example
> I'd like to
>
> -check the current DATE that file is opened
> -if it is opened after a particular date the applications quits.
>
> Ok, I now is very easy to unprotect but it's better that no protection
> at all. (and I know
> they can disable macro at start)
>
> Something like this doesn't work:
>
>
> Sub Apri_Open()
>
> If Date > Worksheets("foglio1").Range("A1") Then
> MsgBox ("expired")
> ThisWorkbook.Close
> End If
> End Sub
>
> Because date() returns the time also.
>
> Thanks,
> Ale.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: how to check password expiration date Cary Shultz [A.D. MVP] Microsoft Windows 2000 Active Directory 0 3rd Aug 2004 06:52 AM
how to check password expiration date jaya Microsoft Windows 2000 Active Directory 0 2nd Aug 2004 08:40 AM
how to check password expiration date jaya Microsoft Windows 2000 Active Directory 0 2nd Aug 2004 08:39 AM
Re: how to check password expiration date Jerold Schulman Microsoft Windows 2000 Active Directory 0 31st Jul 2004 06:57 PM
Is there a command to check the expiration date/ time for a local user account Robert Microsoft Windows 2000 CMD Promt 8 30th Mar 2004 08:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:14 AM.