Results 1 to 5 of 5

Time bomb not working

Threaded View

  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    grantham
    MS-Off Ver
    Excel 2003
    Posts
    10

    Time bomb not working

    ROY UK kindly gave me a solution regarding expiry dates on an excel spread sheet using this coding, fantastic and works the only problem is,if the security setting on someone's machine is set to high the macro doesnt work and they can disable them so the time bomb does not work , i have set auto_run but this does not solve it

    Private Sub Workbook_Open()
        'check if a start date exists
        If IsEmpty(Sheets("Hidden").Cells(1, 1)) Then
            'none exists so add today's date
            Sheets("Hidden").Cells(1, 1).Value = Date
            'if a start date has been recorded, check if it is less than 30 days from start
        ElseIf Date >= Sheets("Hidden").Cells(1, 1).Value + 2 Then
            'alert user that it has expired
            MsgBox "Trial period has expired ", vbOKOnly, "Trial Period Expired"
            'close the workbook without saving
            ThisWorkbook.Close (False)
        End If
    End Sub
    Last edited by go2review; 03-23-2009 at 11:53 AM. Reason: add code tags

Thread Information

Users Browsing this Thread

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

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