View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob I Bob I is offline
external usenet poster
 
Posts: 2,819
Default Expiry of MS Excel file

That is because 11 march 2009 is BEFORE "12/Mar/2009", It is supposed to
open. try "13 march 2009" instead.

Som wrote:

No ,

it is not working...!!!!!!

I've given 11 march 2009

but it is openning......!!!!!!

one thing , I want to inform that here in my office by default MS Excel
Macro Security is 'VERY HIGH'.....

is this creating the problem?

*** how to give different password in MS Excel VB editor?

"Jacob Skaria" wrote:


Hi Som

You need write a piece of code. From the menu go to
Tools--Macro--Visual Basic Editor--
Select Worksheet and copy the below code

Private Sub Workbook_Open()
If DateDiff("d","12/Mar/2009",Date) < -1 Then
Application.ActiveWorkbook.Close
End If
End Sub

This will only allow the workbook to be used upto Mar 12th. Password protect
the Visual Basic Editor before you distribute.

Jacob Skaria
(If this post is helpful please click Yes)