' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Function lastodd(s As String) As Boolean
    Dim v As Integer
    v = CInt(Right(s, 1))
    If Int(v / 2) * 2 = v Then
       lastodd = False
    Else
       lastodd = True
    End If
End Function

Function test()
   MsgBox Str(lastodd("12"))
   MsgBox Str(lastodd("123"))
   MsgBox Str(lastodd("1234"))
   MsgBox Str(lastodd("12345"))
End Function
