Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill file
I have an excel worksheet that I want to delete itself on a certain date. Is
there a code that I use to accomplish this? Thanks for any help in the matter! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill file
EW wrote: I have an excel worksheet that I want to delete itself on a certain date. Is there a code that I use to accomplish this? Thanks for any help in the matter! Hi, Try using the application.ontime method .. Check the help file for additional info. HTH, Tausif |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill file
I don't believe this is possible. For the workbook to delete itself, it has
to contain the code to do so: any attempt to delete the workbook will fail since the workbook will be open at the time and if you close the workbook, you lose the running code. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill file
Hi Tausif,
you can do that by Timer ... rather than application.ontime But there will be a timer running each time you open XL. that timer could be harmed your XL in wrong operation. Sure that timer should be use correctly. Rgds, Halim menuliskan: EW wrote: I have an excel worksheet that I want to delete itself on a certain date. Is there a code that I use to accomplish this? Thanks for any help in the matter! Hi, Try using the application.ontime method .. Check the help file for additional info. HTH, Tausif |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill file
In the ThisWorkbook module try...
Option Explicit Dim Expiry As Long Private Sub Workbook_Open() Expiry = 38958 'serial number for date 8/29/6 If Date = Expiry Then MsgBox "This workbook has expired." 'warning optional With ThisWorkbook .Save .ChangeFileAccess Mode:=xlReadOnly Kill .FullName .Close SaveChanges:=False End With End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Kill file | Excel Programming | |||
Kill a File | Excel Programming | |||
Kill | Excel Programming | |||
'Kill' | Excel Programming | |||
File kill help | Excel Programming |