LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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



 
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
Kill file EW Excel Programming 8 August 17th 06 03:32 AM
Kill a File Posse John Excel Programming 2 August 4th 06 02:23 PM
Kill Michael Excel Programming 2 August 23rd 05 11:53 AM
'Kill' solomon_monkey Excel Programming 7 January 7th 05 09:56 AM
File kill help Marino13[_6_] Excel Programming 0 February 19th 04 01:40 PM


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

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

About Us

"It's about Microsoft Excel"