#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 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



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
Time frame conversion LaurenM Excel Discussion (Misc queries) 1 February 10th 09 11:06 PM
time frame restriction [email protected] Excel Programming 8 May 14th 08 09:42 AM
Time Frame Richard Excel Discussion (Misc queries) 1 May 13th 08 02:37 PM
data time frame [email protected] Excel Programming 2 May 12th 08 03:02 PM
3 Time frame 11050204 Excel Worksheet Functions 1 June 27th 05 03:05 AM


All times are GMT +1. The time now is 09:22 AM.

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"