Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Van Van is offline
external usenet poster
 
Posts: 8
Default Is it possible in Excel to have a file auto delete on a given dat.

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Is it possible in Excel to have a file auto delete on a given dat.

hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Is it possible in Excel to have a file auto delete on a given dat.

you mean like in movies... in 5 sec file will autodestroy?!?!?!?
5
4
3
2
1
bang!!!!!!

;-)

this or something similar?
really, you want file to be deleted from your hdd?

"FSt1" wrote in message
...
hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Is it possible in Excel to have a file auto delete on a given

well.....
a macro can't delete the file it's in.
deleting the data in the file smacks of virus.
how about this.....
Private Sub Workbook_Open()
If Cells(2, 1) < Date Then
MsgBox ("The data in this file has expired." & vbNewLine & _
"Consult somebody about getting new data." & vbNewLine & _
"Not responsibe for horribly bad things that happen" & vbNewLine & _
"if decisions are made with this data.")
End If
End Sub

regards
FSt1

"Sasa Stankovic" wrote:

you mean like in movies... in 5 sec file will autodestroy?!?!?!?
5
4
3
2
1
bang!!!!!!

;-)

this or something similar?
really, you want file to be deleted from your hdd?

"FSt1" wrote in message
...
hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Is it possible in Excel to have a file auto delete on a given

FSt1

Copy this to a new workbook. Save the workbook.

Sub aaaa()
Application.DisplayAlerts = False
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ThisWorkbook.Close False
End Sub

See what happens when you run it.

The trick is to make the workbook readonly then it can commit suicide.

OP could run this from an ontime macro but I would suggest OP give ample warning
to the user of the workbook.

For more on OnTime see Chip Pearson's site.

http://www.cpearson.com/excel/OnTime.aspx


Gord Dibben MS Excel MVP



On Mon, 8 Oct 2007 14:44:03 -0700, FSt1 wrote:

well.....
a macro can't delete the file it's in.
deleting the data in the file smacks of virus.
how about this.....
Private Sub Workbook_Open()
If Cells(2, 1) < Date Then
MsgBox ("The data in this file has expired." & vbNewLine & _
"Consult somebody about getting new data." & vbNewLine & _
"Not responsibe for horribly bad things that happen" & vbNewLine & _
"if decisions are made with this data.")
End If
End Sub

regards
FSt1

"Sasa Stankovic" wrote:

you mean like in movies... in 5 sec file will autodestroy?!?!?!?
5
4
3
2
1
bang!!!!!!

;-)

this or something similar?
really, you want file to be deleted from your hdd?

"FSt1" wrote in message
...
hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Is it possible in Excel to have a file auto delete on a given dat.

hay everyone,
I was just joking in my last post... ;-)
I think that idea is really interesting. Actually, I don't think that anyone
has ever asked me something lke that.
And, how "safe" is to create such macro? What if user runs it and after 10
minutes wants everything back?
I don't see real use but solution is very elegant and nice.

sasa

"FSt1" wrote in message
...
hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Is it possible in Excel to have a file auto delete on a given dat.

Sasa

If user was to run the macro, the workbook is gone.

Does not go to recycle bin for recovery.

How safe and useful depends upon the developer who may want a payment after a
certain date and if payment not forthcoming, workbook is destroyed.

There are less drastic ways to disable a workbook functionality.


Gord


On Tue, 9 Oct 2007 21:53:27 +0200, "Sasa Stankovic" wrote:

hay everyone,
I was just joking in my last post... ;-)
I think that idea is really interesting. Actually, I don't think that anyone
has ever asked me something lke that.
And, how "safe" is to create such macro? What if user runs it and after 10
minutes wants everything back?
I don't see real use but solution is very elegant and nice.

sasa

"FSt1" wrote in message
...
hi,
what do you mean by "auto expire"? what happens when it expires?

cautiously curious
FSt1

"Van" wrote:

I'm trying to get an excel file to auto expire on a preset date. Does a
custom macro exist or can it be done with an Excel function? Thank you



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a delete file icon in Excel 2007? Ray Excel Discussion (Misc queries) 0 June 18th 07 03:48 AM
cannot delete excel file danflip Excel Discussion (Misc queries) 0 April 20th 07 04:20 PM
auto save excel file every 10 minutes to its original file name MEG Excel Discussion (Misc queries) 3 September 8th 05 07:12 PM
excel file deleted. Now howdo you delete file NAME NANMAC New Users to Excel 8 September 2nd 05 07:26 AM
Delete/Close Excel file that is kept OPEN Jafer New Users to Excel 0 April 15th 05 05:34 AM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"