Help!

how to expire Excel file after certain date

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  Spreadsheet won't recalculate  
Author Message
Som
External


Since: May 04, 2007
Posts: 4



PostPosted: Wed Mar 11, 2009 12:29 am    Post subject: how to expire Excel file after certain date
Archived from groups: microsoft>public>excel>misc (more info?)

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?
Back to top
Jacob Skaria
External


Since: Mar 04, 2009
Posts: 568



PostPosted: Wed Mar 11, 2009 2:07 am    Post subject: RE: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
Back to top
T. Valko
External


Since: Nov 24, 2006
Posts: 3649



PostPosted: Wed Mar 11, 2009 5:47 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
Back to top
Sheeloo
External


Since: Mar 02, 2009
Posts: 36



PostPosted: Wed Mar 11, 2009 5:47 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
>
>
>
Back to top
Jacob Skaria
External


Since: Mar 04, 2009
Posts: 568



PostPosted: Wed Mar 11, 2009 5:47 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
> >
> >
> >
Back to top
T. Valko
External


Since: Nov 24, 2006
Posts: 3649



PostPosted: Wed Mar 11, 2009 6:15 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
>>
>>
>>
Back to top
Bill Sharpe
External


Since: Mar 04, 2006
Posts: 90



PostPosted: Wed Mar 11, 2009 1:32 pm    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Jacob Skaria
External


Since: Mar 04, 2009
Posts: 568



PostPosted: Fri Mar 13, 2009 6:22 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Som
External


Since: May 04, 2007
Posts: 4



PostPosted: Fri Mar 13, 2009 11:56 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

unable to find the same, can u please describe more how to go?

"Jacob Skaria" wrote:

> 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
>
Back to top
David J. Braden
External


Since: Oct 11, 2004
Posts: 29



PostPosted: Fri Mar 13, 2009 7:53 pm    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Look under the Tools menu when you are in VBA, not under Excel's tools.
Dave

Som wrote:
> unable to find the same, can u please describe more how to go?
>
> "Jacob Skaria" wrote:
>
>> 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
>>

--
Please keep response(s) solely within this thread.
Back to top
Som
External


Since: May 04, 2007
Posts: 4



PostPosted: Sat Mar 14, 2009 12:26 am    Post subject: Re: how to expire Excel file after certain date [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

dear all,

thanks for your involvement .

now the file is deleting if macro runs ....

1. how protect / encrypt the code.

2. next concern is Macro security is by default HIGH , I cann't give up !!!!
pls help me find out the way..... is there any option that wherever the file
will be openned the Macro security will be changed to LOW ??

3. is there anyother way apart from Macro to do the same?

I need to complete the job

waiting.......

"David J. Braden" wrote:

> Look under the Tools menu when you are in VBA, not under Excel's tools.
> Dave
>
> Som wrote:
> > unable to find the same, can u please describe more how to go?
> >
> > "Jacob Skaria" wrote:
> >
> >> 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
> >>
>
> --
> Please keep response(s) solely within this thread.
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum