ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   time frame (https://www.excelbanter.com/excel-programming/417741-time-frame.html)

Brett

time frame
 
i have created various excell based programs for my employees to use, but i
want to have them only accessed for a period of time.
is there show how a way i can add a a specific time frame so if the the
spread sheet is accessed after the time expires (eg. 3 months) the spread
sheet will not open

cheers
brett

Andym

time frame
 
Try this code within the ThisWorkbook module:

Const expireDate As Date = #12/1/2008#

Private Sub Workbook_Open()
If Date expireDate Then
MsgBox "This program has expired."
ThisWorkbook.Close
End If
End Sub

If you are worried about users modifying the expireDate constant, you can
password protect the visual basic project so it cannot be modified. This
code will only close the workbook if macros are enabled. If they are not
enabled, users will not be able to execute any macros, but they can still
have the workbook open.

"brett" wrote:

i have created various excell based programs for my employees to use, but i
want to have them only accessed for a period of time.
is there show how a way i can add a a specific time frame so if the the
spread sheet is accessed after the time expires (eg. 3 months) the spread
sheet will not open

cheers
brett


Mike Fogleman[_2_]

time frame
 
See Chip Pearson's site:

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

Mike F
"brett" wrote in message
...
i have created various excell based programs for my employees to use, but i
want to have them only accessed for a period of time.
is there show how a way i can add a a specific time frame so if the the
spread sheet is accessed after the time expires (eg. 3 months) the spread
sheet will not open

cheers
brett





All times are GMT +1. The time now is 08:03 AM.

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