Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
autodestruction
Hi,
I try to protect my file from users modifying data. Is there a way I can delete a file when I see they have change the data according to a specific date ?? I know it is strange but I need this to avoid corrupted files TK Douvid |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
autodestruction
Douvid wrote:
Is there a way I can delete a file when I see they have change the data according to a specific date ?? Not sure what you mean by "according to a specific date" In VBA you can find out the "last modified" date for a file using the FileDateTime function. If the file is open (other than read-only) in Excel then this date will be misleading as it is set to when the file was opened. You can use the Kill statement to delete a file. So If FileDateTime("C:\MyFile.ext")DateSerial(2003,1,1) Then Kill "C:\MyFile.ext" End If Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|