Hi All,
I have a code in Visual Basic to verify if a copy is valid or expired. In VBA works fine, however I cannot put it straight as it is into Attachmate Basic (it does not work).
Does anybody know what is wrong and how to rewrite it, please?
Sub Ver()
Dim exp As Date 'variable to holds expiration date
exp = #1/30/2008#
If exp < Date Then 'check expiration date vs today's date
Debug.Print "Expired" 'sample action if condition is true
Else
Debug.Print "OK" ' sample action if condition is false
End If
End Sub
regards,
Sagit
I have a code in Visual Basic to verify if a copy is valid or expired. In VBA works fine, however I cannot put it straight as it is into Attachmate Basic (it does not work).
Does anybody know what is wrong and how to rewrite it, please?
Sub Ver()
Dim exp As Date 'variable to holds expiration date
exp = #1/30/2008#
If exp < Date Then 'check expiration date vs today's date
Debug.Print "Expired" 'sample action if condition is true
Else
Debug.Print "OK" ' sample action if condition is false
End If
End Sub
regards,
Sagit