ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Add In - Limited Use? (https://www.excelbanter.com/excel-programming/313740-excel-add-limited-use.html)

sirin[_3_]

Excel Add In - Limited Use?
 

Jerry,
You are right. I only want the code such a way that outside the dat
range it will not perform any action. Iwill putup a msgbox saying tha
the date is passed away and now code will not work. All the users ar
our employees only at different offices and they can easily call me i
required. But I dont want to delete anything on any other users pc.

Hope someone can offer nice solution woth example code or atleast fe
pointers that help me acheive it.

Regards,




Bob Phillips Wrote:
Hi Myrna,

I think it was the OP that misunderstood.

Bob

"Myrna Larson" wrote in message
...
I thought the suggestion was to remove the code in the addin rathe

than
the
data. Did I misunderstand?


On Fri, 15 Oct 2004 12:38:32 GMT, "Jerry W. Lewis"
wrote:

Not working outside the date range (as Bob Phillips suggested) is
acceptable behavior, but destroying user data would lead mos

potential
customers to look elsewere and potentially get you sued by thos

who
don't run.

Jerry

sirin wrote:

I coded an add in to be used only for 48days starting 28-Oct-04

Not
before that and not after that. Just passing the instructions t

user
accordingly is not sufficient. If any user uses it after that o

before
that, it will screw up the data.

How to acheive it programetically?

Thanks.



--
siri
-----------------------------------------------------------------------
sirin's Profile: http://www.excelforum.com/member.php...fo&userid=1528
View this thread: http://www.excelforum.com/showthread.php?threadid=26951


keepITcool

Excel Add In - Limited Use?
 
try like


Option Explicit

Private Sub Workbook_Open()
Const dtExpire As Date = #10/15/2004#
Dim ai As AddIn
Dim wbTmp As Workbook
If Date dtExpire Then
MsgBox "Expired", vbCritical
If Me.IsAddin Then
For Each ai In AddIns
If ai.Name = Me.Name Then
If ai.Installed Then ai.Installed = False
Exit For
End If
Next
End If
Me.Close
End If
End Sub




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


sirin wrote:


Jerry,
You are right. I only want the code such a way that outside the date
range it will not perform any action. Iwill putup a msgbox saying that
the date is passed away and now code will not work. All the users are
our employees only at different offices and they can easily call me if
required. But I dont want to delete anything on any other users pc.

Hope someone can offer nice solution woth example code or atleast few
pointers that help me acheive it.

Regards,




Bob Phillips Wrote:
Hi Myrna,

I think it was the OP that misunderstood.

Bob

"Myrna Larson" wrote in message
...
I thought the suggestion was to remove the code in the addin rather
than the data. Did I misunderstand?


On Fri, 15 Oct 2004 12:38:32 GMT, "Jerry W. Lewis"
wrote:

Not working outside the date range (as Bob Phillips suggested) is
acceptable behavior, but destroying user data would lead most
potential customers to look elsewere and potentially get you sued
by those who don't run.

Jerry

sirin wrote:

I coded an add in to be used only for 48days starting 28-Oct-04.
Not before that and not after that. Just passing the

instructions
to user accordingly is not sufficient. If any user uses it after
that or before that, it will screw up the data.

How to acheive it programetically?

Thanks.





Jerry W. Lewis

Excel Add In - Limited Use?
 
Instead of a popup, which would require code, put your message on the
page that the workbook opens to (possibly with all other pages hidden)
then use the the code to restore the working environment, as well as
actually doing the work. Follow the link that Bob Phillips suggested
for eithder "Deleting A Procedure From A Module", "Deleting A Module
From A Workbook", "Deleting All Code From A Module", or "Deleting All
VBA Code In A Project" to remove/deactivate your code when outside the
date range.

To check on the date, use something like

If Date DateValue("10/30/2004") Then
' fail
Else
' work
EndIf

Jerry

sirin wrote:

Jerry,
You are right. I only want the code such a way that outside the date
range it will not perform any action. Iwill putup a msgbox saying that
the date is passed away and now code will not work. All the users are
our employees only at different offices and they can easily call me if
required. But I dont want to delete anything on any other users pc.

Hope someone can offer nice solution woth example code or atleast few
pointers that help me acheive it.




All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com