Auto deletion of excel file after a certain date - expiry

S

Som

after a certain date(date will provided by me) a password protected MS
excel file or it's data will deleted permanently.

(even if the client user copies (n number of copies) the file to their own
PCs also
from our PC).

I require this option for licence issue... Can u please help me?

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.

at present my code is

my code to close the file (not deletion)

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


Private Sub Workbook_Open()

If DateDiff("d", "10/Mar/2009", Date) > 1 Then

Application.ActiveWorkbook.Close

End If

End Sub

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

it is failing again in another PC....

because by default in my client company , the macro level set very high...
so it is
not running in all 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


is there any troubleshoot of the above situation ?

-------------------------------------------------------------


atleast , if file gets deleted in 1st shot , there will not be any option of
R & D by the client.


so I think , deletion code can serve the purpose.

pls help me
 
J

Jacob Skaria

Som, there is no way to delete a file by its own; unless you are allowed to
run the scripts/macro.

If this post helps click Yes
 
J

Jacob Skaria

Som, unless you are able to run macros (if security level is set to high)
there is no point trying this.

If you can set security level to low; I will definitely give it a try. Thanks


If this post helps click Yes
 
G

Gord Dibben

Give it up Som

First of all, there are just too many ways to circumvent your wishes.

Second, you state "bear in mind security is set at "high""

How do you think any code will run?


Gord Dibben MS Excel MVP
 
S

Som

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.......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top