+ Reply to Thread
Results 1 to 2 of 2

time limited excel file

  1. #1
    Registered User
    Join Date
    05-10-2015
    Location
    Ryton
    MS-Off Ver
    Office 2013
    Posts
    49

    time limited excel file

    Hi All
    An old thread has come to my attention (Link below) which enables you to close a project after an elapsed time


    http://www.excelforum.com/excel-gene...xcel-file.html

    The code (shamlessly taken from the post ) is below

    Private Sub Workbook_Open()
    If Date > DateSerial(2013, 1, 10) Then
    If InputBox("Please enter code ") = "123" Then
    Exit Sub
    Else
    MsgBox "The time limit has passed. This workbook will now close."
    ActiveWorkbook.Close
    End If

    End If

    End Sub
    advancing on from this is there a way of getting a message box to appear say 7 days before the termination date

    regards Moose

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: time limited excel file

    Hi Mad Moose,

    See the attached file which includes the following Macro in the ThisWorkbook module:
    Please Login or Register  to view this content.
    However, this creates a problem if you want to access the file after it expires. If you put the following Macros in your personal workbook, you should be able to access the file by:
    a. Opening Excel with no file.
    b. Run Macro DisableMacros().
    c. You should now be able to open the file.
    d. Run Macro EnableMacros(). Now the file will behave as expected.
    Please Login or Register  to view this content.
    Lewis
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Time limited Excel file
    By OM2 in forum Excel General
    Replies: 24
    Last Post: 10-06-2015, 10:07 AM
  2. How to sum a limited time only offer
    By Help_Me_Rhonda in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2013, 06:44 AM
  3. Tab limited file
    By mmonica in forum Excel General
    Replies: 2
    Last Post: 03-21-2012, 12:31 PM
  4. Excel : Convert data in column to limited row (time and date format)
    By hooi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2011, 07:21 PM
  5. how to get the (average or sum) in a limited period of time
    By voltaire101 in forum Excel General
    Replies: 6
    Last Post: 01-23-2009, 07:35 AM
  6. Limited xls file validity
    By markfoigel in forum Excel General
    Replies: 1
    Last Post: 04-08-2008, 06:54 PM
  7. How to convert De-limited text file to excel
    By Venkatesh S in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-02-2005, 09:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1