Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code For Expiration Date
I downloaded an AddIn from a website, this AddIn had an
expiration date after which you had to pay the programer for a pass code. I payd and it worked. I want to learn how to do this. Can someone help pls. Regards. Juan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code For Expiration Date
In the workbook open event, check the date against a date you have written
on a worksheet in the addin. If the date is exceeded, check another cell for an appropriate passcode, if found, continue to run the workbook_open event, otherwise put up a prompt for the pass code - if valid, write it to the cell and continue to open else put up a nag dialog, then close the workbook. -- Regards, Tom Ogilvy Juan wrote in message ... I downloaded an AddIn from a website, this AddIn had an expiration date after which you had to pay the programer for a pass code. I payd and it worked. I want to learn how to do this. Can someone help pls. Regards. Juan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code For Expiration Date
Juan, here's a starting point... this code is from this ng...
put it in the workbook... it'll fire as soon as the wb is opened... HTH seeya ste Option Explicit Private Sub Workbook_Open() 'Public should be private when doing this for real Dim myCutOff As Long myCutOff = DateSerial(2003, 12, 12) 'just change the date to when you want it to activate If Date myCutOff Then MsgBox "I'm sorry, this workbook should have expired on: " _ & Format(myCutOff, "mm/dd/yyyy") & vbLf & _ "After you dismiss this box, this program will pause for: " _ & CLng(Date) - myCutOff & " seconds!" & vbLf & vbLf & _ "One second for each day past expiration!" Application.Wait TimeSerial(Hour(Now), Minute(Now), _ Second(Now) + CLng(Date) - myCutOff) End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculat an expiration date | Excel Worksheet Functions | |||
How do I set a start and expiration date using IF function | Excel Worksheet Functions | |||
Expiration Date countdown | Excel Worksheet Functions | |||
Macro Expiration Code | Excel Discussion (Misc queries) | |||
color code a row by expiration date? | Excel Worksheet Functions |