you can now secure/restrict the usage of your tool/macro by adding below code in excel.
Private Sub Workbook_Open()
Dim Sdate As Date
Dim edate As Date
Dim Rkey As String
Sdate = encrpt(GetSetting(appname:="App", Section:="class", key:="SD", Default:=encrpt("01/01/2000")))
edate = encrpt(GetSetting(appname:="App", Section:="class", key:="ED", Default:=encrpt("01/01/2000")))
Rkey = encrpt(GetSetting(appname:="App", Section:="Class", key:="Key", Default:="pxbac"))
If Sdate = "01/01/2000" And edate = "01/01/2000" And Rkey = "pxbac" Then
MsgBox "Its a Trial version"
SaveSetting appname:="App", Section:="class", key:="SD", Setting:=encrpt(Date)
SaveSetting appname:="App", Section:="class", key:="ED", Setting:=encrpt(Date + 30)
SaveSetting appname:="App", Section:="class", key:="Key", Setting:=encrpt("trial")
ElseIf Sdate <> "01/01/2000" And edate <> "01/01/2000" And Rkey = "trial" Then
MsgBox edate - Date & " Days Left."
ElseIf Sdate <> "01/01/2000" And edate <> "01/01/2000" And Rkey = "mingo" Then
MsgBox "Complete version"
End If
End Sub
-----------------------------------------------------------------------------------------------
Function encrpt(ecrptthis)
Dim stringchar, keychar, crptchar
For i = 1 To Len(ecrptthis)
stringchar = Asc(Mid(ecrptthis, i, 1))
keychar = Asc(Mid(keygen, i, 1))
crptchar = stringchar Xor keychar
strencrpt = strencrpt & Chr(crptchar)
Next
encrpt = strencrpt
End Function
-------------------------------------------------------------------------------------
Function keygen()
keygen = "adflsn4w#$^23%@^$FDSDTwqaer^ERQ#W#$^*%$%DE!3fqDTw6rt*^$#"
End Function