Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a Demo Verion 1

Status
Not open for further replies.

DODO1

MIS
Feb 18, 2003
22
0
0
BE

Hi,

Does anybody know how I can make a Demo version of an excel application using visual basic? I was thinking of using a date or counting the number of times the programme is started.


thank you

DODO1

 
You can use registry "VB and VBA Settings" key. There are GetSetting function and SaveSetting statement (plus GetAllSettings) to simplify access to that section of registry. For instance:

[tt]Counter=GetSetting(appname:="YourDemoApp", section:="StartUp", Key:="Counter", Default:=0)
Counter=Counter+1
' close application if counter>limit
SaveSetting appname:="YourDemoApp", section:="StartUp", Key:="Counter", setting:=Counter[/tt]

combo
 
Thank You Combo

Just 1 thing, how do you reset the counter?

DODO1
 
Just use the same way, somewhere:
[tt]SaveSetting appname:="YourDemoApp", section:="StartUp", Key:="Counter", setting:=0[/tt]
You can use other keys in your application, as ...Key:="Demo", setting:=True etc.
You can find some help in VBA help file.
BTW, it is not the best way to protect application (and excel is not the best platform for creating well secured application), but enough for standard user with blocked access to the registry.

combo
 
Thanks Combo, you get a star from me.

DODO1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top