Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculat an expiration date old coach Excel Worksheet Functions 0 February 23rd 09 03:55 AM
How do I set a start and expiration date using IF function John A[_2_] Excel Worksheet Functions 2 February 20th 09 01:46 PM
Expiration Date countdown Colin Hayes Excel Worksheet Functions 3 January 15th 09 01:23 PM
Macro Expiration Code Teddy-B Excel Discussion (Misc queries) 3 October 20th 08 05:15 PM
color code a row by expiration date? kate Excel Worksheet Functions 6 August 15th 06 08:14 AM


All times are GMT +1. The time now is 07:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"