Group:  Microsoft Excel ยป microsoft.public.excel.programming
Thread: Try-before-you-buy version?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Try-before-you-buy version?
"Phil C" <philip.cosgriff[ at ]virgin.net> 01.03.2006 17:05:02
Hi folks

I have produced a complex spreadsheet (medical application) that is now
available for sale at a modest price. It contains some VBA, but not much. I
am not an expert, but have made extensive use of Excel's built-in functions
for curve fitting, graph ploting etc. A colleague in another (UK) hospital
has asked about an 'evaluation version'. Is there a standard way of
producing a spreadsheet that has all the basic functionality to allow a user
to decide whether it works properly etc, but with something key missing
(that would prompt them to buy the full version!)?

Time-out after (say) 30 days. I seem to recall that this is not
straightforward
Somehow disable the sheet | print function?
Any other ideas?

I am using Excel 2003. My development machine still has Windows 2000, but
most potential users will have XP.

Thanks for you help.

Philip





Re: Try-before-you-buy version?
"Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> 01.03.2006 17:46:57
You can do various things, but all of them are pointless if faced by someone
who intends to crack it as Excel security is laughably weak.

I haven't used it with VBA myself, but the author assures me that
http://www.thescarms.com/appsentinel/default.asp the functionality does
extend to VBA, but of course you need to buy it.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> Hi folks
>
> I have produced a complex spreadsheet (medical application) that is now
> available for sale at a modest price. It contains some VBA, but not much.
I
> am not an expert, but have made extensive use of Excel's built-in
functions
> for curve fitting, graph ploting etc. A colleague in another (UK) hospital
> has asked about an 'evaluation version'. Is there a standard way of
> producing a spreadsheet that has all the basic functionality to allow a
user
> to decide whether it works properly etc, but with something key missing
> (that would prompt them to buy the full version!)?
>
> Time-out after (say) 30 days. I seem to recall that this is not
> straightforward
> Somehow disable the sheet | print function?
> Any other ideas?
>
> I am using Excel 2003. My development machine still has Windows 2000, but
> most potential users will have XP.
>
> Thanks for you help.
>
> Philip
>
>
>
>
>


Re: Try-before-you-buy version?
"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> 01.03.2006 18:11:18
Not sure it is worth the trouble, but your best bet may be this:

Move some part of your VBA code to a VB6 ActiveX dll. This has to be
essential code and also not too simple
otherwise people could just code around it in VBA.
You don't have to have VB6, somebody could make it for you.
People wanting to buy your software then need to send you some unique
identifier related to their hardware,
for example the HD Volume serial number.
From this information you then make a licence file with in it this encrypted
HD Volume serial number.
The ActiveX dll will then read this information from the PC's HD and see if
it matches the encrypted data
in the licence file.
If it matches fine, if not it will exit and the software can't work.
You could incoorporate a date in the licence file as well if you want them
to pay every year for example.

If you are not familiar with these things you could for example do it via
Rent A Coder.

It would be much easier to do it all in VBA, but as said it will be easy to
crack.


RBS


"Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> Hi folks
>
> I have produced a complex spreadsheet (medical application) that is now
> available for sale at a modest price. It contains some VBA, but not much.
> I
> am not an expert, but have made extensive use of Excel's built-in
> functions
> for curve fitting, graph ploting etc. A colleague in another (UK) hospital
> has asked about an 'evaluation version'. Is there a standard way of
> producing a spreadsheet that has all the basic functionality to allow a
> user
> to decide whether it works properly etc, but with something key missing
> (that would prompt them to buy the full version!)?
>
> Time-out after (say) 30 days. I seem to recall that this is not
> straightforward
> Somehow disable the sheet | print function?
> Any other ideas?
>
> I am using Excel 2003. My development machine still has Windows 2000, but
> most potential users will have XP.
>
> Thanks for you help.
>
> Philip
>
>
>
>
>

Re: Try-before-you-buy version?
"Phil C" <philip.cosgriff[ at ]virgin.net> 01.03.2006 19:25:34
Bob .. and RBS

Thanks for your responses. The sort of people on the receiving end are not
the types with the time or inclination to crack software security systems,
however weak. This only needs to be 'token security' to fulfill its purpose
(i.e. clearly demonstarte that it is not the release version).

AppsSentinel sounds like it would do the job (I don't want to invest much
time on this, as I may not get many more requests for an evaluation copy!),
so may invest in the Lite version ($70) to find out..

Philip


"Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> You can do various things, but all of them are pointless if faced by
someone
> who intends to crack it as Excel security is laughably weak.
>
> I haven't used it with VBA myself, but the author assures me that
> http://www.thescarms.com/appsentinel/default.asp the functionality does
> extend to VBA, but of course you need to buy it.
>
> --
> HTH
>
> Bob Phillips
>
> (remove nothere from email address if mailing direct)
>
> "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
> news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
> > Hi folks
> >
> > I have produced a complex spreadsheet (medical application) that is now
> > available for sale at a modest price. It contains some VBA, but not
much.
> I
> > am not an expert, but have made extensive use of Excel's built-in
> functions
> > for curve fitting, graph ploting etc. A colleague in another (UK)
hospital
> > has asked about an 'evaluation version'. Is there a standard way of
> > producing a spreadsheet that has all the basic functionality to allow a
> user
> > to decide whether it works properly etc, but with something key missing
> > (that would prompt them to buy the full version!)?
> >
> > Time-out after (say) 30 days. I seem to recall that this is not
> > straightforward
> > Somehow disable the sheet | print function?
> > Any other ideas?
> >
> > I am using Excel 2003. My development machine still has Windows 2000,
but
> > most potential users will have XP.
> >
> > Thanks for you help.
> >
> > Philip
> >
> >
> >
> >
> >
>
>


Re: Try-before-you-buy version?
"Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> 01.03.2006 22:31:14
Philip,

Before you spend your $70, and on the basis of the type of users you have,
try this approach first.

Private Sub Workbook_Open()
Const sEDName As String = "__ExpiryDate"
Const nEvalPeriod As Long = 30
Dim ExpiryDate As Date
Dim sDate As String

On Error Resume Next
ExpiryDate = Evaluate(ThisWorkbook.Names(sEDName).RefersTo)
On Error GoTo 0

If ExpiryDate = 0 Then
ThisWorkbook.Names.Add Name:=sEDName, _
RefersTo:=Date + nEvalPeriod
ThisWorkbook.Names(sEDName).Visible = False
ThisWorkbook.Save
Else
If ExpiryDate < Date Then
ThisWorkbook.Close savechanges:=False
End If
End If

End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
news:Onfk2VWPGHA.720[ at ]TK2MSFTNGP14.phx.gbl...
[Quoted Text]
> Bob .. and RBS
>
> Thanks for your responses. The sort of people on the receiving end are not
> the types with the time or inclination to crack software security systems,
> however weak. This only needs to be 'token security' to fulfill its
purpose
> (i.e. clearly demonstarte that it is not the release version).
>
> AppsSentinel sounds like it would do the job (I don't want to invest much
> time on this, as I may not get many more requests for an evaluation
copy!),
> so may invest in the Lite version ($70) to find out..
>
> Philip
>
>
> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
> news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
> > You can do various things, but all of them are pointless if faced by
> someone
> > who intends to crack it as Excel security is laughably weak.
> >
> > I haven't used it with VBA myself, but the author assures me that
> > http://www.thescarms.com/appsentinel/default.asp the functionality does
> > extend to VBA, but of course you need to buy it.
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > (remove nothere from email address if mailing direct)
> >
> > "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
> > news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
> > > Hi folks
> > >
> > > I have produced a complex spreadsheet (medical application) that is
now
> > > available for sale at a modest price. It contains some VBA, but not
> much.
> > I
> > > am not an expert, but have made extensive use of Excel's built-in
> > functions
> > > for curve fitting, graph ploting etc. A colleague in another (UK)
> hospital
> > > has asked about an 'evaluation version'. Is there a standard way of
> > > producing a spreadsheet that has all the basic functionality to allow
a
> > user
> > > to decide whether it works properly etc, but with something key
missing
> > > (that would prompt them to buy the full version!)?
> > >
> > > Time-out after (say) 30 days. I seem to recall that this is not
> > > straightforward
> > > Somehow disable the sheet | print function?
> > > Any other ideas?
> > >
> > > I am using Excel 2003. My development machine still has Windows 2000,
> but
> > > most potential users will have XP.
> > >
> > > Thanks for you help.
> > >
> > > Philip
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>


Re: Try-before-you-buy version?
"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> 01.03.2006 23:38:30
Or another way, with a password on the VBAProject:

Option Explicit
Private bOutTrialPeriod As Boolean

Sub TestTrial()

With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
If .Find("'", _
5, _
1, _
5, _
2, _
False, _
True) = False Then
'marking the first date the WB was used
'--------------------------------------
.ReplaceLine 5, "'" & CLng(Date)
ThisWorkbook.Save
Else
If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
"'", _
"", _
1, _
1, _
vbBinaryCompare)) > 30 Then
'more than 30 usage of WB, so out of trial period
'------------------------------------------------
bOutTrialPeriod = True
End If
End If
End With

End Sub

The variable bOutTrialPeriod can then be used for whatever way to make the
WB
more or less unusable, ranging from a nagging message to making it close.
Note that this doesn't need a reference to Microsoft Visual Basic for
Applications Extensibility


RBS


"Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
news:O4Mlg$XPGHA.668[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text]
> Philip,
>
> Before you spend your $70, and on the basis of the type of users you have,
> try this approach first.
>
> Private Sub Workbook_Open()
> Const sEDName As String = "__ExpiryDate"
> Const nEvalPeriod As Long = 30
> Dim ExpiryDate As Date
> Dim sDate As String
>
> On Error Resume Next
> ExpiryDate = Evaluate(ThisWorkbook.Names(sEDName).RefersTo)
> On Error GoTo 0
>
> If ExpiryDate = 0 Then
> ThisWorkbook.Names.Add Name:=sEDName, _
> RefersTo:=Date + nEvalPeriod
> ThisWorkbook.Names(sEDName).Visible = False
> ThisWorkbook.Save
> Else
> If ExpiryDate < Date Then
> ThisWorkbook.Close savechanges:=False
> End If
> End If
>
> End Sub
>
> 'This is workbook event code.
> 'To input this code, right click on the Excel icon on the worksheet
> '(or next to the File menu if you maximise your workbooks),
> 'select View Code from the menu, and paste the code
>
>
>
> --
> HTH
>
> Bob Phillips
>
> (remove nothere from email address if mailing direct)
>
> "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
> news:Onfk2VWPGHA.720[ at ]TK2MSFTNGP14.phx.gbl...
>> Bob .. and RBS
>>
>> Thanks for your responses. The sort of people on the receiving end are
>> not
>> the types with the time or inclination to crack software security
>> systems,
>> however weak. This only needs to be 'token security' to fulfill its
> purpose
>> (i.e. clearly demonstarte that it is not the release version).
>>
>> AppsSentinel sounds like it would do the job (I don't want to invest much
>> time on this, as I may not get many more requests for an evaluation
> copy!),
>> so may invest in the Lite version ($70) to find out..
>>
>> Philip
>>
>>
>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>> news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
>> > You can do various things, but all of them are pointless if faced by
>> someone
>> > who intends to crack it as Excel security is laughably weak.
>> >
>> > I haven't used it with VBA myself, but the author assures me that
>> > http://www.thescarms.com/appsentinel/default.asp the functionality does
>> > extend to VBA, but of course you need to buy it.
>> >
>> > --
>> > HTH
>> >
>> > Bob Phillips
>> >
>> > (remove nothere from email address if mailing direct)
>> >
>> > "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>> > news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
>> > > Hi folks
>> > >
>> > > I have produced a complex spreadsheet (medical application) that is
> now
>> > > available for sale at a modest price. It contains some VBA, but not
>> much.
>> > I
>> > > am not an expert, but have made extensive use of Excel's built-in
>> > functions
>> > > for curve fitting, graph ploting etc. A colleague in another (UK)
>> hospital
>> > > has asked about an 'evaluation version'. Is there a standard way of
>> > > producing a spreadsheet that has all the basic functionality to allow
> a
>> > user
>> > > to decide whether it works properly etc, but with something key
> missing
>> > > (that would prompt them to buy the full version!)?
>> > >
>> > > Time-out after (say) 30 days. I seem to recall that this is not
>> > > straightforward
>> > > Somehow disable the sheet | print function?
>> > > Any other ideas?
>> > >
>> > > I am using Excel 2003. My development machine still has Windows 2000,
>> but
>> > > most potential users will have XP.
>> > >
>> > > Thanks for you help.
>> > >
>> > > Philip
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>

Re: Try-before-you-buy version?
"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> 02.03.2006 00:15:45
Forgot to say run TestTrial from the Workbook_Open event.

RBS

"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
news:eBQYMlYPGHA.428[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> Or another way, with a password on the VBAProject:
>
> Option Explicit
> Private bOutTrialPeriod As Boolean
>
> Sub TestTrial()
>
> With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
> If .Find("'", _
> 5, _
> 1, _
> 5, _
> 2, _
> False, _
> True) = False Then
> 'marking the first date the WB was used
> '--------------------------------------
> .ReplaceLine 5, "'" & CLng(Date)
> ThisWorkbook.Save
> Else
> If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
> "'", _
> "", _
> 1, _
> 1, _
> vbBinaryCompare)) > 30 Then
> 'more than 30 usage of WB, so out of trial period
> '------------------------------------------------
> bOutTrialPeriod = True
> End If
> End If
> End With
>
> End Sub
>
> The variable bOutTrialPeriod can then be used for whatever way to make the
> WB
> more or less unusable, ranging from a nagging message to making it close.
> Note that this doesn't need a reference to Microsoft Visual Basic for
> Applications Extensibility
>
>
> RBS
>
>
> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
> news:O4Mlg$XPGHA.668[ at ]TK2MSFTNGP11.phx.gbl...
>> Philip,
>>
>> Before you spend your $70, and on the basis of the type of users you
>> have,
>> try this approach first.
>>
>> Private Sub Workbook_Open()
>> Const sEDName As String = "__ExpiryDate"
>> Const nEvalPeriod As Long = 30
>> Dim ExpiryDate As Date
>> Dim sDate As String
>>
>> On Error Resume Next
>> ExpiryDate = Evaluate(ThisWorkbook.Names(sEDName).RefersTo)
>> On Error GoTo 0
>>
>> If ExpiryDate = 0 Then
>> ThisWorkbook.Names.Add Name:=sEDName, _
>> RefersTo:=Date + nEvalPeriod
>> ThisWorkbook.Names(sEDName).Visible = False
>> ThisWorkbook.Save
>> Else
>> If ExpiryDate < Date Then
>> ThisWorkbook.Close savechanges:=False
>> End If
>> End If
>>
>> End Sub
>>
>> 'This is workbook event code.
>> 'To input this code, right click on the Excel icon on the worksheet
>> '(or next to the File menu if you maximise your workbooks),
>> 'select View Code from the menu, and paste the code
>>
>>
>>
>> --
>> HTH
>>
>> Bob Phillips
>>
>> (remove nothere from email address if mailing direct)
>>
>> "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>> news:Onfk2VWPGHA.720[ at ]TK2MSFTNGP14.phx.gbl...
>>> Bob .. and RBS
>>>
>>> Thanks for your responses. The sort of people on the receiving end are
>>> not
>>> the types with the time or inclination to crack software security
>>> systems,
>>> however weak. This only needs to be 'token security' to fulfill its
>> purpose
>>> (i.e. clearly demonstarte that it is not the release version).
>>>
>>> AppsSentinel sounds like it would do the job (I don't want to invest
>>> much
>>> time on this, as I may not get many more requests for an evaluation
>> copy!),
>>> so may invest in the Lite version ($70) to find out..
>>>
>>> Philip
>>>
>>>
>>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>>> news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
>>> > You can do various things, but all of them are pointless if faced by
>>> someone
>>> > who intends to crack it as Excel security is laughably weak.
>>> >
>>> > I haven't used it with VBA myself, but the author assures me that
>>> > http://www.thescarms.com/appsentinel/default.asp the functionality
>>> > does
>>> > extend to VBA, but of course you need to buy it.
>>> >
>>> > --
>>> > HTH
>>> >
>>> > Bob Phillips
>>> >
>>> > (remove nothere from email address if mailing direct)
>>> >
>>> > "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>>> > news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
>>> > > Hi folks
>>> > >
>>> > > I have produced a complex spreadsheet (medical application) that is
>> now
>>> > > available for sale at a modest price. It contains some VBA, but not
>>> much.
>>> > I
>>> > > am not an expert, but have made extensive use of Excel's built-in
>>> > functions
>>> > > for curve fitting, graph ploting etc. A colleague in another (UK)
>>> hospital
>>> > > has asked about an 'evaluation version'. Is there a standard way of
>>> > > producing a spreadsheet that has all the basic functionality to
>>> > > allow
>> a
>>> > user
>>> > > to decide whether it works properly etc, but with something key
>> missing
>>> > > (that would prompt them to buy the full version!)?
>>> > >
>>> > > Time-out after (say) 30 days. I seem to recall that this is not
>>> > > straightforward
>>> > > Somehow disable the sheet | print function?
>>> > > Any other ideas?
>>> > >
>>> > > I am using Excel 2003. My development machine still has Windows
>>> > > 2000,
>>> but
>>> > > most potential users will have XP.
>>> > >
>>> > > Thanks for you help.
>>> > >
>>> > > Philip
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> >
>>> >
>>>
>>>
>>
>>
>

Re: Try-before-you-buy version?
"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> 15.04.2006 00:19:16
Or you can do it like this with a setting in the registry:

Option Explicit
Private bOutTrialPeriod As Boolean

Sub TestTrial()

Dim strStartDate As String

strStartDate = GetSetting(appname:="MyApp", _
section:="Trial_Start", _
key:="Date", _
Default:="0")

If strStartDate = "0" Then
SaveSetting appname:="MyApp", _
section:="Trial_Start", _
key:="Date", _
setting:=CStr(CLng(Date))
Else
If CLng(Date) - CLng(strStartDate) > 30 Then
'more than 30 usage of WB, so out of trial period
'------------------------------------------------
bOutTrialPeriod = True
End If
End If

If bOutTrialPeriod Then
MsgBox "Out of the trial period now, will have to buy!", vbExclamation,
_
"start date: " & Format(CLng(strStartDate), "dddd d mmm yyyy")
End If

End Sub


RBS

"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
news:%23gBhuOZPGHA.1088[ at ]tk2msftngp13.phx.gbl...
[Quoted Text]
> Overlooked the fact that you can't alter the VBE if the WB is protected,
> so you will have to have a fixed start date of the trial period, added at
> line 5, so you will get:
>
> Sub TestTrial()
> '38778
> With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
> If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
> "'", _
> "", _
> 1, _
> 1, _
> vbBinaryCompare)) > 30 Then
> 'more than 30 usage of WB, so out of trial period
> '------------------------------------------------
> bOutTrialPeriod = True
> End If
> End With
>
> End Sub
>
>
> RBS
>
>
> "RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
> news:ujwtA6YPGHA.3260[ at ]TK2MSFTNGP11.phx.gbl...
>> Forgot to say run TestTrial from the Workbook_Open event.
>>
>> RBS
>>
>> "RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
>> news:eBQYMlYPGHA.428[ at ]tk2msftngp13.phx.gbl...
>>> Or another way, with a password on the VBAProject:
>>>
>>> Option Explicit
>>> Private bOutTrialPeriod As Boolean
>>>
>>> Sub TestTrial()
>>>
>>> With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
>>> If .Find("'", _
>>> 5, _
>>> 1, _
>>> 5, _
>>> 2, _
>>> False, _
>>> True) = False Then
>>> 'marking the first date the WB was used
>>> '--------------------------------------
>>> .ReplaceLine 5, "'" & CLng(Date)
>>> ThisWorkbook.Save
>>> Else
>>> If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
>>> "'", _
>>> "", _
>>> 1, _
>>> 1, _
>>> vbBinaryCompare)) > 30 Then
>>> 'more than 30 usage of WB, so out of trial period
>>> '------------------------------------------------
>>> bOutTrialPeriod = True
>>> End If
>>> End If
>>> End With
>>>
>>> End Sub
>>>
>>> The variable bOutTrialPeriod can then be used for whatever way to make
>>> the WB
>>> more or less unusable, ranging from a nagging message to making it
>>> close.
>>> Note that this doesn't need a reference to Microsoft Visual Basic for
>>> Applications Extensibility
>>>
>>>
>>> RBS
>>>
>>>
>>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>>> news:O4Mlg$XPGHA.668[ at ]TK2MSFTNGP11.phx.gbl...
>>>> Philip,
>>>>
>>>> Before you spend your $70, and on the basis of the type of users you
>>>> have,
>>>> try this approach first.
>>>>
>>>> Private Sub Workbook_Open()
>>>> Const sEDName As String = "__ExpiryDate"
>>>> Const nEvalPeriod As Long = 30
>>>> Dim ExpiryDate As Date
>>>> Dim sDate As String
>>>>
>>>> On Error Resume Next
>>>> ExpiryDate = Evaluate(ThisWorkbook.Names(sEDName).RefersTo)
>>>> On Error GoTo 0
>>>>
>>>> If ExpiryDate = 0 Then
>>>> ThisWorkbook.Names.Add Name:=sEDName, _
>>>> RefersTo:=Date + nEvalPeriod
>>>> ThisWorkbook.Names(sEDName).Visible = False
>>>> ThisWorkbook.Save
>>>> Else
>>>> If ExpiryDate < Date Then
>>>> ThisWorkbook.Close savechanges:=False
>>>> End If
>>>> End If
>>>>
>>>> End Sub
>>>>
>>>> 'This is workbook event code.
>>>> 'To input this code, right click on the Excel icon on the worksheet
>>>> '(or next to the File menu if you maximise your workbooks),
>>>> 'select View Code from the menu, and paste the code
>>>>
>>>>
>>>>
>>>> --
>>>> HTH
>>>>
>>>> Bob Phillips
>>>>
>>>> (remove nothere from email address if mailing direct)
>>>>
>>>> "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>>>> news:Onfk2VWPGHA.720[ at ]TK2MSFTNGP14.phx.gbl...
>>>>> Bob .. and RBS
>>>>>
>>>>> Thanks for your responses. The sort of people on the receiving end are
>>>>> not
>>>>> the types with the time or inclination to crack software security
>>>>> systems,
>>>>> however weak. This only needs to be 'token security' to fulfill its
>>>> purpose
>>>>> (i.e. clearly demonstarte that it is not the release version).
>>>>>
>>>>> AppsSentinel sounds like it would do the job (I don't want to invest
>>>>> much
>>>>> time on this, as I may not get many more requests for an evaluation
>>>> copy!),
>>>>> so may invest in the Lite version ($70) to find out..
>>>>>
>>>>> Philip
>>>>>
>>>>>
>>>>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>>>>> news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
>>>>> > You can do various things, but all of them are pointless if faced by
>>>>> someone
>>>>> > who intends to crack it as Excel security is laughably weak.
>>>>> >
>>>>> > I haven't used it with VBA myself, but the author assures me that
>>>>> > http://www.thescarms.com/appsentinel/default.asp the functionality
>>>>> > does
>>>>> > extend to VBA, but of course you need to buy it.
>>>>> >
>>>>> > --
>>>>> > HTH
>>>>> >
>>>>> > Bob Phillips
>>>>> >
>>>>> > (remove nothere from email address if mailing direct)
>>>>> >
>>>>> > "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>>>>> > news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
>>>>> > > Hi folks
>>>>> > >
>>>>> > > I have produced a complex spreadsheet (medical application) that
>>>>> > > is
>>>> now
>>>>> > > available for sale at a modest price. It contains some VBA, but
>>>>> > > not
>>>>> much.
>>>>> > I
>>>>> > > am not an expert, but have made extensive use of Excel's built-in
>>>>> > functions
>>>>> > > for curve fitting, graph ploting etc. A colleague in another (UK)
>>>>> hospital
>>>>> > > has asked about an 'evaluation version'. Is there a standard way
>>>>> > > of
>>>>> > > producing a spreadsheet that has all the basic functionality to
>>>>> > > allow
>>>> a
>>>>> > user
>>>>> > > to decide whether it works properly etc, but with something key
>>>> missing
>>>>> > > (that would prompt them to buy the full version!)?
>>>>> > >
>>>>> > > Time-out after (say) 30 days. I seem to recall that this is not
>>>>> > > straightforward
>>>>> > > Somehow disable the sheet | print function?
>>>>> > > Any other ideas?
>>>>> > >
>>>>> > > I am using Excel 2003. My development machine still has Windows
>>>>> > > 2000,
>>>>> but
>>>>> > > most potential users will have XP.
>>>>> > >
>>>>> > > Thanks for you help.
>>>>> > >
>>>>> > > Philip
>>>>> > >
>>>>> > >
>>>>> > >
>>>>> > >
>>>>> > >
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Try-before-you-buy version?
"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> 02.03.2007 00:52:48
Overlooked the fact that you can't alter the VBE if the WB is protected, so
you will have to have a fixed start date of the trial period, added at line
5, so you will get:

Sub TestTrial()
'38778
With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
"'", _
"", _
1, _
1, _
vbBinaryCompare)) > 30 Then
'more than 30 usage of WB, so out of trial period
'------------------------------------------------
bOutTrialPeriod = True
End If
End With

End Sub


RBS


"RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
news:ujwtA6YPGHA.3260[ at ]TK2MSFTNGP11.phx.gbl...
[Quoted Text]
> Forgot to say run TestTrial from the Workbook_Open event.
>
> RBS
>
> "RB Smissaert" <bartsmissaert[ at ]blueyonder.co.uk> wrote in message
> news:eBQYMlYPGHA.428[ at ]tk2msftngp13.phx.gbl...
>> Or another way, with a password on the VBAProject:
>>
>> Option Explicit
>> Private bOutTrialPeriod As Boolean
>>
>> Sub TestTrial()
>>
>> With ThisWorkbook.VBProject.VBComponents("Module1").CodeModule
>> If .Find("'", _
>> 5, _
>> 1, _
>> 5, _
>> 2, _
>> False, _
>> True) = False Then
>> 'marking the first date the WB was used
>> '--------------------------------------
>> .ReplaceLine 5, "'" & CLng(Date)
>> ThisWorkbook.Save
>> Else
>> If CLng(Date) - CLng(Replace(Trim(.Lines(5, 1)), _
>> "'", _
>> "", _
>> 1, _
>> 1, _
>> vbBinaryCompare)) > 30 Then
>> 'more than 30 usage of WB, so out of trial period
>> '------------------------------------------------
>> bOutTrialPeriod = True
>> End If
>> End If
>> End With
>>
>> End Sub
>>
>> The variable bOutTrialPeriod can then be used for whatever way to make
>> the WB
>> more or less unusable, ranging from a nagging message to making it close.
>> Note that this doesn't need a reference to Microsoft Visual Basic for
>> Applications Extensibility
>>
>>
>> RBS
>>
>>
>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>> news:O4Mlg$XPGHA.668[ at ]TK2MSFTNGP11.phx.gbl...
>>> Philip,
>>>
>>> Before you spend your $70, and on the basis of the type of users you
>>> have,
>>> try this approach first.
>>>
>>> Private Sub Workbook_Open()
>>> Const sEDName As String = "__ExpiryDate"
>>> Const nEvalPeriod As Long = 30
>>> Dim ExpiryDate As Date
>>> Dim sDate As String
>>>
>>> On Error Resume Next
>>> ExpiryDate = Evaluate(ThisWorkbook.Names(sEDName).RefersTo)
>>> On Error GoTo 0
>>>
>>> If ExpiryDate = 0 Then
>>> ThisWorkbook.Names.Add Name:=sEDName, _
>>> RefersTo:=Date + nEvalPeriod
>>> ThisWorkbook.Names(sEDName).Visible = False
>>> ThisWorkbook.Save
>>> Else
>>> If ExpiryDate < Date Then
>>> ThisWorkbook.Close savechanges:=False
>>> End If
>>> End If
>>>
>>> End Sub
>>>
>>> 'This is workbook event code.
>>> 'To input this code, right click on the Excel icon on the worksheet
>>> '(or next to the File menu if you maximise your workbooks),
>>> 'select View Code from the menu, and paste the code
>>>
>>>
>>>
>>> --
>>> HTH
>>>
>>> Bob Phillips
>>>
>>> (remove nothere from email address if mailing direct)
>>>
>>> "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>>> news:Onfk2VWPGHA.720[ at ]TK2MSFTNGP14.phx.gbl...
>>>> Bob .. and RBS
>>>>
>>>> Thanks for your responses. The sort of people on the receiving end are
>>>> not
>>>> the types with the time or inclination to crack software security
>>>> systems,
>>>> however weak. This only needs to be 'token security' to fulfill its
>>> purpose
>>>> (i.e. clearly demonstarte that it is not the release version).
>>>>
>>>> AppsSentinel sounds like it would do the job (I don't want to invest
>>>> much
>>>> time on this, as I may not get many more requests for an evaluation
>>> copy!),
>>>> so may invest in the Lite version ($70) to find out..
>>>>
>>>> Philip
>>>>
>>>>
>>>> "Bob Phillips" <bob.phillips[ at ]notheretiscali.co.uk> wrote in message
>>>> news:u#oJpgVPGHA.428[ at ]tk2msftngp13.phx.gbl...
>>>> > You can do various things, but all of them are pointless if faced by
>>>> someone
>>>> > who intends to crack it as Excel security is laughably weak.
>>>> >
>>>> > I haven't used it with VBA myself, but the author assures me that
>>>> > http://www.thescarms.com/appsentinel/default.asp the functionality
>>>> > does
>>>> > extend to VBA, but of course you need to buy it.
>>>> >
>>>> > --
>>>> > HTH
>>>> >
>>>> > Bob Phillips
>>>> >
>>>> > (remove nothere from email address if mailing direct)
>>>> >
>>>> > "Phil C" <philip.cosgriff[ at ]virgin.net> wrote in message
>>>> > news:%233X7UHVPGHA.3196[ at ]TK2MSFTNGP09.phx.gbl...
>>>> > > Hi folks
>>>> > >
>>>> > > I have produced a complex spreadsheet (medical application) that is
>>> now
>>>> > > available for sale at a modest price. It contains some VBA, but not
>>>> much.
>>>> > I
>>>> > > am not an expert, but have made extensive use of Excel's built-in
>>>> > functions
>>>> > > for curve fitting, graph ploting etc. A colleague in another (UK)
>>>> hospital
>>>> > > has asked about an 'evaluation version'. Is there a standard way of
>>>> > > producing a spreadsheet that has all the basic functionality to
>>>> > > allow
>>> a
>>>> > user
>>>> > > to decide whether it works properly etc, but with something key
>>> missing
>>>> > > (that would prompt them to buy the full version!)?
>>>> > >
>>>> > > Time-out after (say) 30 days. I seem to recall that this is not
>>>> > > straightforward
>>>> > > Somehow disable the sheet | print function?
>>>> > > Any other ideas?
>>>> > >
>>>> > > I am using Excel 2003. My development machine still has Windows
>>>> > > 2000,
>>>> but
>>>> > > most potential users will have XP.
>>>> > >
>>>> > > Thanks for you help.
>>>> > >
>>>> > > Philip
>>>> > >
>>>> > >
>>>> > >
>>>> > >
>>>> > >
>>>> >
>>>> >
>>>>
>>>>
>>>
>>>
>>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net