Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Expiring the Old program in Excel.

Dear All,
I'm making some programs (Excel with VBA) for Engineers use.
I will revise the program every 6 months and send it to my branch people
(Engineers)
The problem is even though I'm mentioing my revision every time in my
program, some time our people may forget and they are using the old version.
I'm asking them to delete the old version and use the latest but in vain.

I just want to ask one thing whether we can able to provide some expiry date
for that program (in the form of VB Coding) so that even though if the people
use the old version, it wil never open (or) activate. Hence people may aware
to use the latest version.
Is it Possible in EXCEL WITH VBA?
Please advise.
Regards,
Anand.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Expiring the Old program in Excel.

You could may use something with BuiltinDocumentProperties and CreationDate
in the Workbook_Open and test if
< DateAdd("m", -6, Now())
Check the help for these terms.

NickHK

"Premanand Sethuraman" wrote
in message ...
Dear All,
I'm making some programs (Excel with VBA) for Engineers use.
I will revise the program every 6 months and send it to my branch people
(Engineers)
The problem is even though I'm mentioing my revision every time in my
program, some time our people may forget and they are using the old

version.
I'm asking them to delete the old version and use the latest but in vain.

I just want to ask one thing whether we can able to provide some expiry

date
for that program (in the form of VB Coding) so that even though if the

people
use the old version, it wil never open (or) activate. Hence people may

aware
to use the latest version.
Is it Possible in EXCEL WITH VBA?
Please advise.
Regards,
Anand.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Expiring the Old program in Excel.

Dear Nick,
Thanks for your immediatel treply.
I tried this with "minutes" to expire but it is not working. I've given the
codings here

Private Sub Workbook_Open()
Dim dat As Date
dat = 27 / 11 / 2006
If dat DateAdd("m", 5, "27/11/2006") Then
MsgBox ("This program is expired. Please contact H.O for revised Program")
ActiveWorkbook.Close
Else
End If
End Sub

Please advise me how should I modify?
Regards,
Anand.


"NickHK" wrote:

You could may use something with BuiltinDocumentProperties and CreationDate
in the Workbook_Open and test if
< DateAdd("m", -6, Now())
Check the help for these terms.

NickHK

"Premanand Sethuraman" wrote
in message ...
Dear All,
I'm making some programs (Excel with VBA) for Engineers use.
I will revise the program every 6 months and send it to my branch people
(Engineers)
The problem is even though I'm mentioing my revision every time in my
program, some time our people may forget and they are using the old

version.
I'm asking them to delete the old version and use the latest but in vain.

I just want to ask one thing whether we can able to provide some expiry

date
for that program (in the form of VB Coding) so that even though if the

people
use the old version, it wil never open (or) activate. Hence people may

aware
to use the latest version.
Is it Possible in EXCEL WITH VBA?
Please advise.
Regards,
Anand.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Expiring the Old program in Excel.

Try these.

- What value do you get for CLng(dat) ?
Does it = 0 ?
What is the value of 27 divided by 11 divided by 2007 ?

- Using a date literal in VBA, you need to enclose it in #..date..#
However, depending on the user's Short Date settings (dd/mm/yy v. mm/dd/yy),
this could yield the wrong date, although in this case it will not, as there
is no 27th month
To be clear use:
DateSerial(2007, 11, 27)

- "m" means months, not minutes. That is "n". Check the help for DateAdd.

-Your logic on the date comparison is wrong. Assuming a 6 month expiration
date, you something like :
dat=dateSerial(2007,4,27)
If DateAdd("m", 6, dat) < Now() Then

NickHK

"Premanand Sethuraman" wrote
in message ...
Dear Nick,
Thanks for your immediatel treply.
I tried this with "minutes" to expire but it is not working. I've given

the
codings here

Private Sub Workbook_Open()
Dim dat As Date
dat = 27 / 11 / 2006
If dat DateAdd("m", 5, "27/11/2006") Then
MsgBox ("This program is expired. Please contact H.O for revised Program")
ActiveWorkbook.Close
Else
End If
End Sub

Please advise me how should I modify?
Regards,
Anand.


"NickHK" wrote:

You could may use something with BuiltinDocumentProperties and

CreationDate
in the Workbook_Open and test if
< DateAdd("m", -6, Now())
Check the help for these terms.

NickHK

"Premanand Sethuraman"

wrote
in message ...
Dear All,
I'm making some programs (Excel with VBA) for Engineers use.
I will revise the program every 6 months and send it to my branch

people
(Engineers)
The problem is even though I'm mentioing my revision every time in my
program, some time our people may forget and they are using the old

version.
I'm asking them to delete the old version and use the latest but in

vain.

I just want to ask one thing whether we can able to provide some

expiry
date
for that program (in the form of VB Coding) so that even though if the

people
use the old version, it wil never open (or) activate. Hence people may

aware
to use the latest version.
Is it Possible in EXCEL WITH VBA?
Please advise.
Regards,
Anand.






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
Expiring passwords don Excel Discussion (Misc queries) 0 March 30th 09 01:26 PM
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
Expiring/Killing Macro(s) FARAZ QURESHI Excel Discussion (Misc queries) 5 January 8th 07 08:20 PM
Expiring the Old Program on Particular date. Is it Possible? Premanand Sethuraman Excel Programming 0 November 27th 06 07:10 AM
Expiring Travis King Excel Worksheet Functions 8 June 4th 06 10:15 PM


All times are GMT +1. The time now is 01:36 PM.

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

About Us

"It's about Microsoft Excel"