I will be amazed if it can be done!!!!!!!!!!!!
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: I will be amazed if it can be done!!!!!!!!!!!!

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am working on a microsoft EXCEL file. This file contains calculations.

    I want to distribute this file through my website but at the same time I want my clients to download new version every six months.

    Now the problem is that I want this excel file to stop working on a specified future date. It could be in either way:
    - to lock the file automatically on a specified date; or
    - to delete the file on a specified date; or
    - to lock and show a specified worksheet only with message that the file has expired and how to get new version
    - to lock all sheets except one
    etc.......

    Please help me how to do this.

    Any other way to get this function and the results...

    Imran Rashid
    http://www.exportfinance.com.pk

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-27 12:01, imranrashid wrote:
    I am working on a microsoft EXCEL file. This file contains calculations.

    I want to distribute this file through my website but at the same time I want my clients to download new version every six months.

    Now the problem is that I want this excel file to stop working on a specified future date. It could be in either way:
    - to lock the file automatically on a specified date; or
    - to delete the file on a specified date; or
    - to lock and show a specified worksheet only with message that the file has expired and how to get new version
    - to lock all sheets except one
    etc.......

    Please help me how to do this.

    Any other way to get this function and the results...

    Imran Rashid
    http://www.exportfinance.com.pk
    i am sure this can be done by using the ontime method, look it up in help as a starting point.

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Houston, TX
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Easiest thing to try would be to add some code in the Workbook_Open event, first thing, test the date against your die date, and prompt a msg then exit the workbook.

    If Now() >= CDate("6/27/02") then
    MsgBox "Get a new copy"
    me.close
    end if

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You could check at open the date versus the date that the file stops working, which could be located in a hidden sheet, or in the registry or in a text file...

    One thing, Excel isn't the most secure tool... what I mean is, if someone wants to get it, they can.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  5. #5
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi imranrashid

    There quite a few ways this could be done, most far from fool-proof though. The code below is just one of many ways. This code must be placed in the Private Module of "ThisWorkbook".


    Private Sub Workbook_Open()
    Dim stPass As String
    Dim stDate As String
    Dim wsSheet As Worksheet

    On Error Resume Next
    Application.DisplayAlerts = False
    Sheets.Add().Name = "DateChecker"
    If ActiveSheet.Name <> "DateChecker" Then ActiveSheet.Delete

    Sheets("DateChecker").Visible = xlVeryHidden
    If Sheets("DateChecker").Range("A1") = "" Then
    Sheets("DateChecker").Range("A1") = Date
    Me.Save
    End If

    If Sheets("DateChecker").Range("A1") + 30 > Date Then
    Sheets.Add before:=Sheets(1)
    For Each wsSheet In Me.Worksheets
    If wsSheet.Index <> 1 Then wsSheet.Delete
    Next wsSheet
    Application.DisplayAlerts = True
    Me.Save
    End If

    End Sub

    The code will add the date to a hidden sheet the first time they open the file. From then on it will check the date each time they open. If the date on the hidden sheet is greater than 30 days old the code adds a sheet(Excel requires at least one visible sheet), then deletes all others. This may of course be a bit dramatic for your needs, but hopefully it will get you started.



User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com