![]() |
How do I limit the period of use of my xls programs for trial use
This provision is necessary for potential purchasers of my programs in the
event of their non-purchase decision by the user. |
How do I limit the period of use of my xls programs for trial use
No cure all guarantee, but you can use the registry to store data that can
then be "decoded." You must also hide the code so that it is not visible/editable. Again, not a cure all, as someone will most likely find a way around it. "Don" wrote: This provision is necessary for potential purchasers of my programs in the event of their non-purchase decision by the user. |
How do I limit the period of use of my xls programs for trial use
Try this below, its not fool proof but you can set a date and if the workbook is opened or closed on or after that date it will delete itself! However, deleting something on another persons computer is classed as "virus activity" and should not be carried out without you stating your intentions to your proposed buyer! HTH Simon Sub Auto_Open() Dim MyDate MyDate = #10/04/2005# If Date = MyDate Then Call KillActive End If End Sub Sub KillActive() dim sName as String On Error Resume Next sName = ThisWorkbook.FullName Application.DisplayAlerts = False ThisWorkbook.ChangeFileAccess xlReadOnly Kill sName Application.DislayAlerts = True ThisWorkbook.Close SaveChanges:=False End Sub Sub Auto_close() Dim MyDate MyDate = #10/04/2005# If Date = MyDate Then Call KillActive End If End Sub -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=472844 |
How do I limit the period of use of my xls programs for trial
Yeah a little strong. Might be better just to exit the app. Still there's
the issue of identifying the date against which to compare. "Simon Lloyd" wrote: Try this below, its not fool proof but you can set a date and if the workbook is opened or closed on or after that date it will delete itself! However, deleting something on another persons computer is classed as "virus activity" and should not be carried out without you stating your intentions to your proposed buyer! HTH Simon Sub Auto_Open() Dim MyDate MyDate = #10/04/2005# If Date = MyDate Then Call KillActive End If End Sub Sub KillActive() dim sName as String On Error Resume Next sName = ThisWorkbook.FullName Application.DisplayAlerts = False ThisWorkbook.ChangeFileAccess xlReadOnly Kill sName Application.DislayAlerts = True ThisWorkbook.Close SaveChanges:=False End Sub Sub Auto_close() Dim MyDate MyDate = #10/04/2005# If Date = MyDate Then Call KillActive End If End Sub -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=472844 |
All times are GMT +1. The time now is 07:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com