ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code to terminate access after certain time (https://www.excelbanter.com/excel-programming/296001-code-terminate-access-after-certain-time.html)

bruce forster

code to terminate access after certain time
 
I am creating a program to be distributed to other users via cd. is there anyway to have the program terminate after a certain time so that the person can not go to another employer and use the program?

Thanks

Bob Phillips[_6_]

code to terminate access after certain time
 
Look at the OnTime method in help , or see Chip's page at
http://www.cpearson.com/excel/ontime.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bruce forster" wrote in message
...
I am creating a program to be distributed to other users via cd. is there

anyway to have the program terminate after a certain time so that the person
can not go to another employer and use the program??

Thanks




mudraker[_185_]

code to terminate access after certain time
 
Try this

Sub Auto_Open()
If Now() "25/04/2004" Then
ThisWorkbook.Close savechanges:=False
End If
End Su

--
Message posted from http://www.ExcelForum.com


David Adamson[_3_]

code to terminate access after certain time
 
for certain time I am assuming that you mean days

A know it can be done via date for a demonstration file and put it in the
Auto_Open and/or Close function

I think if you use the DateDiff(interval, date1, date2[, firstdayofweek[,
firstweekofyear]])

What you do is check if the difference bewteen the two dates has expired and
run what you want to happen.

However, if the person knows this all they have to do is reset the date on
their computer to get around this.

If you want the program to close after a number of minutues try searching
for "splash screen" as that displays a userfrom for a few seconds.



"bruce forster" wrote in message
...
I am creating a program to be distributed to other users via cd. is there

anyway to have the program terminate after a certain time so that the person
can not go to another employer and use the program??

Thanks




Bob Phillips[_6_]

code to terminate access after certain time
 
Sorry mis-read it.

You can put various snares in the code, but none are reliable as the Excel
security model is very weak, and easily circumvented. The only safe way is
to build a VB application that you can compile as an executable or a DLL and
secure that.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bob Phillips" wrote in message
...
Look at the OnTime method in help , or see Chip's page at
http://www.cpearson.com/excel/ontime.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bruce forster" wrote in message
...
I am creating a program to be distributed to other users via cd. is

there
anyway to have the program terminate after a certain time so that the

person
can not go to another employer and use the program??

Thanks







All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com