Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Som Som is offline
external usenet poster
 
Posts: 26
Default how to expire Excel file after certain date

after a certain date(date will provided by the user) a password protected MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a certain
date(date will provided by the user) a password protected MS excel file will
be destroyed in any form ??? (even if the 2nd line user copies (n number of
copies) the file to their own PCs also from our PC).I require this option for
some copyright / licence issue... Can u please help me?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to expire Excel file after certain date

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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a certain
date(date will provided by the user) a password protected MS excel file will
be destroyed in any form ??? (even if the 2nd line user copies (n number of
copies) the file to their own PCs also from our PC).I require this option for
some copyright / licence issue... Can u please help me?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default how to expire Excel file after certain date

All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected
MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel file
will
be destroyed in any form ??? (even if the 2nd line user copies (n number
of
copies) the file to their own PCs also from our PC).I require this option
for
some copyright / licence issue... Can u please help me?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default how to expire Excel file after certain date

What will be result if the user choses to disable macros?

"T. Valko" wrote:

All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected
MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel file
will
be destroyed in any form ??? (even if the 2nd line user copies (n number
of
copies) the file to their own PCs also from our PC).I require this option
for
some copyright / licence issue... Can u please help me?




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default how to expire Excel file after certain date

No expiry date!

--
Biff
Microsoft Excel MVP


"Sheeloo" <Click above to get my email id wrote in message
...
What will be result if the user choses to disable macros?

"T. Valko" wrote:

All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
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)

"Som" wrote:

after a certain date(date will provided by the user) a password
protected
MS
excel file will not open with valid password OR the data of the said
file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel
file
will
be destroyed in any form ??? (even if the 2nd line user copies (n
number
of
copies) the file to their own PCs also from our PC).I require this
option
for
some copyright / licence issue... Can u please help me?








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to expire Excel file after certain date

Just a clarification.

On disable macro: Cant the user have some functionalities controlled by
scripts. This needs to be enabled only from Workbook_Open(); to make sure
that the user always enables the macros.

On changing dates: In Excel the user can record the last open Date and Time
to VBE.CodePanes of the workbook itself and check aganist that during every
Workbook_Open();

Appreciate your thoughts.........


"Sheeloo" wrote:

What will be result if the user choses to disable macros?

"T. Valko" wrote:

All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected
MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel file
will
be destroyed in any form ??? (even if the 2nd line user copies (n number
of
copies) the file to their own PCs also from our PC).I require this option
for
some copyright / licence issue... Can u please help me?




  #7   Report Post  
Posted to microsoft.public.excel.misc
Som Som is offline
external usenet poster
 
Posts: 26
Default how to expire Excel file after certain date

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?



"T. Valko" wrote:

All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected
MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel file
will
be destroyed in any form ??? (even if the 2nd line user copies (n number
of
copies) the file to their own PCs also from our PC).I require this option
for
some copyright / licence issue... Can u please help me?




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default how to expire Excel file after certain date

Since 11 March is not greater than today, it is supposed to open. Change
the expire date to yesterday.

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?



"T. Valko" wrote:


All they have to do is set their system date back.

See this:

http://www.cpearson.com/Excel/workbooktimebomb.aspx

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...

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)

"Som" wrote:


after a certain date(date will provided by the user) a password protected
MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a
certain
date(date will provided by the user) a password protected MS excel file
will
be destroyed in any form ??? (even if the 2nd line user copies (n number
of
copies) the file to their own PCs also from our PC).I require this option
for
some copyright / licence issue... Can u please help me?





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 348
Default how to expire Excel file after certain date

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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a certain
date(date will provided by the user) a password protected MS excel file will
be destroyed in any form ??? (even if the 2nd line user copies (n number of
copies) the file to their own PCs also from our PC).I require this option for
some copyright / licence issue... Can u please help me?


I have a suspicion that if a user were to open the file in
OpenOffice.Org's scalc program the macro would not work. I haven't tried
this particular approach, but I have been able to view protected VBA
code in Excel worksheets opened with scalc.

Excel's password protection is pretty weak.

Bill
  #10   Report Post  
Posted to microsoft.public.excel.misc
Som Som is offline
external usenet poster
 
Posts: 26
Default how to expire Excel file after certain date

no it failed again in another PC....

because by default in my company , the macro level set very high... so it is
not running in other PCs

msg comnig -- " Macros are disabled because the security level is set very
high. To run the macros , change the security level to a lower setting and
verify the macros are signed & trusted"

, now what to do ??

i cann't change all PC s macro security setting of client location....

so i have to do the job keeping in my mind that " macro security will be
high "

now pls advise



"Som" wrote:

my new code--------


===============================================+


Private Sub Workbook_Open()
MsgBox "Ok"
MsgBox DateDiff("d", "10/Mar/2009", Date)
If DateDiff("d", "10/Mar/2009", Date) 1 Then
MsgBox "Ok1"
Application.ActiveWorkbook.Close
End If
MsgBox "Ok2"
End Sub

==================================================

it is working ....... it should be greater than not less than !!!!!!!!!



my mail id is

can u pls send me atest mail , so that i can send u the file & screenshots of the error



"Bill Sharpe" wrote:

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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a certain
date(date will provided by the user) a password protected MS excel file will
be destroyed in any form ??? (even if the 2nd line user copies (n number of
copies) the file to their own PCs also from our PC).I require this option for
some copyright / licence issue... Can u please help me?


I have a suspicion that if a user were to open the file in
OpenOffice.Org's scalc program the macro would not work. I haven't tried
this particular approach, but I have been able to view protected VBA
code in Excel worksheets opened with scalc.

Excel's password protection is pretty weak.

Bill



  #11   Report Post  
Posted to microsoft.public.excel.misc
Som Som is offline
external usenet poster
 
Posts: 26
Default how to expire Excel file after certain date

can u give me a code which will delete the excel file permanently if somebody
tries to open the file after the specified date ?
how to protect the code in the MS VB editor for macro , so that nobody can
see the code before expiry date / deletion date.

"Som" wrote:

no it failed again in another PC....

because by default in my company , the macro level set very high... so it is
not running in other PCs

msg comnig -- " Macros are disabled because the security level is set very
high. To run the macros , change the security level to a lower setting and
verify the macros are signed & trusted"

, now what to do ??

i cann't change all PC s macro security setting of client location....

so i have to do the job keeping in my mind that " macro security will be
high "

now pls advise



"Som" wrote:

my new code--------


===============================================+


Private Sub Workbook_Open()
MsgBox "Ok"
MsgBox DateDiff("d", "10/Mar/2009", Date)
If DateDiff("d", "10/Mar/2009", Date) 1 Then
MsgBox "Ok1"
Application.ActiveWorkbook.Close
End If
MsgBox "Ok2"
End Sub

==================================================

it is working ....... it should be greater than not less than !!!!!!!!!



my mail id is

can u pls send me atest mail , so that i can send u the file & screenshots of the error



"Bill Sharpe" wrote:

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)

"Som" wrote:

after a certain date(date will provided by the user) a password protected MS
excel file will not open with valid password OR the data of the said file
will be erased OR file will be corrupted .In one sentence , after a certain
date(date will provided by the user) a password protected MS excel file will
be destroyed in any form ??? (even if the 2nd line user copies (n number of
copies) the file to their own PCs also from our PC).I require this option for
some copyright / licence issue... Can u please help me?


I have a suspicion that if a user were to open the file in
OpenOffice.Org's scalc program the macro would not work. I haven't tried
this particular approach, but I have been able to view protected VBA
code in Excel worksheets opened with scalc.

Excel's password protection is pretty weak.

Bill

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to expire Excel file after certain date

Hi Som

On your query on how to protect macro
User Tools--VBA Properties--Protection to protect the macro

If macro security is by default set to high; then there is no point trying
out with macros.

If this post helps click Yes
-------------
Jacob Skaria

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
Expire count down Sweetie[_2_] Excel Worksheet Functions 5 September 19th 08 05:02 AM
making excel to notifying you about expire dates on your sheet F.M.H Excel Worksheet Functions 3 August 20th 08 01:35 PM
Setting a date for a workbook to expire dave.d71 Excel Discussion (Misc queries) 4 June 4th 08 09:09 PM
Having Data in Fields Expire. (Excel) RussellC Excel Discussion (Misc queries) 1 March 22nd 07 05:05 PM
seeking way to expire excel documents after certain date in Office Rajat Excel Discussion (Misc queries) 2 September 30th 05 10:46 PM


All times are GMT +1. The time now is 05:02 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"