any idea why I getting an error on this code and how to complete it, thanks !!!
Sub Globals
'Declare the global variables here.
regdt=Date(Now)
rc=0
End Sub
Sub App_Start
Form1.Show
reg
End Sub
Sub reg
Dim regexp
ErrorLabel(Err1)
If FileExist ("c:\windows\clrbn.txt") = true Then
FileOpen (c1,"c:\windows\clrbn.txt",cRead)
r = FileRead (c1)
FileClose (c1)
Else
regdt=Date(Now)
FileOpen (c1,"c:\windows\clrbn.txt",cWrite)
FileWrite (c1,regdt)
FileClose (c1)
End If
textbox1.Text=r ' Displays Registration Date
textbox3.text=Date(Now) ' Displays Today Date
rd=DateAdd(r, 0, 1, 0)'sets reg duration (Ticks, Years, Months, Days)for one month
textbox2.text=rd ' Displays Registration Expires Date
dn=Date(Now)
If dn > rd Msgbox("Registration Expired, Contact Support for Registered Version, Contact [email protected]"):rc=1 ' if date now later then regdate by 1 month
Goto sed
err1:
Msgbox("Registration Error, Contact Support, [email protected]")
sed:
'if rc=1 then (Control code (what to disable after reg. expires))
End Sub
Sub Globals
'Declare the global variables here.
regdt=Date(Now)
rc=0
End Sub
Sub App_Start
Form1.Show
reg
End Sub
Sub reg
Dim regexp
ErrorLabel(Err1)
If FileExist ("c:\windows\clrbn.txt") = true Then
FileOpen (c1,"c:\windows\clrbn.txt",cRead)
r = FileRead (c1)
FileClose (c1)
Else
regdt=Date(Now)
FileOpen (c1,"c:\windows\clrbn.txt",cWrite)
FileWrite (c1,regdt)
FileClose (c1)
End If
textbox1.Text=r ' Displays Registration Date
textbox3.text=Date(Now) ' Displays Today Date
rd=DateAdd(r, 0, 1, 0)'sets reg duration (Ticks, Years, Months, Days)for one month
textbox2.text=rd ' Displays Registration Expires Date
dn=Date(Now)
If dn > rd Msgbox("Registration Expired, Contact Support for Registered Version, Contact [email protected]"):rc=1 ' if date now later then regdate by 1 month
Goto sed
err1:
Msgbox("Registration Error, Contact Support, [email protected]")
sed:
'if rc=1 then (Control code (what to disable after reg. expires))
End Sub