Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 .com, "A" 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
encrypting MS document with expiration date | Excel Discussion (Misc queries) | |||
Calculat an expiration date | Excel Worksheet Functions | |||
Expiration Date countdown | Excel Worksheet Functions | |||
Expiration date on Macro | Excel Programming | |||
Code For Expiration Date | Excel Programming |