Expiring a Workbook
Results 1 to 3 of 3

Thread: Expiring a Workbook
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Jul 2004
    Posts
    116
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Expiring a Workbook

    Is it possible to put an expiry date ina workbook... i.e. using a macro?

    I have a price list that i only want to be valid until a certain time period

    any thoughts would be great, thanks

  2. #2
    MrExcel MVP Joe Was's Avatar
    Join Date
    Feb 2002
    Location
    Central Florida, USA
    Posts
    7,539
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Private Sub Workbook_Open()
    'This code go's into the "ThisWorkbook" module.
    Dim myTime
    myTime = Time

    'If today is older than the date below run:
    If Now() >= #9/20/2004# Then
    MsgBox "Time is Up!"
    End If

    'If the time is between the times below run:
    If Time >= "6:00:00 PM" And Time <= "6:35:00 PM" Then
    myMsg = MsgBox(prompt:="The current System-Time is:" & _
    vbCr & vbCr & " " & _
    FormatDateTime(myTime, vbLongTime) & vbCr & vbCr & vbCr & _
    " and, ""Today"" is:" & vbCr & vbCr & _
    FormatDateTime(Date, vbLongDate) & vbCr & vbCr, Title:=Now())
    End If

    End Sub
    JSW: Try and try again: "The way of the Coder!"

  3. #3
    Board Regular
    Join Date
    Jan 2007
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Expiring a Workbook

    I have one doubt..if the computer system date is manipulated then these codes will not be effective to prohibit a client from using a macro utility beyond its expiry date..

    can we make a macro to internally keep track of dates independent of the computer system date so that the macro will automatically get expired on its expiry date?

Some videos you may like

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
  •