|
-
September 14th, 2001, 02:28 PM
#1
arrays
Can anyone tell me exactly what this function does?
Dim intLCV As Long
Dim intResult As Long
Static Multiply As Variant
'routing number check digit calculation.
'Returns true if checkdigit is valid, false if
'not.
Multiply = Array(0, 3, 7, 1, 3, 7, 1, 3, 7)
If Len(strRNum) = 9 And IsNumeric(strRNum) Then
For intLCV = 1 To 8
intResult = intResult + (Multiply(intLCV) * CInt(Mid(strRNum, intLCV, 1)))
Next intLCV
If (10 - (intResult Mod 10)) Mod 10 = CInt(Right(strRNum, 1)) Then
CheckDigit = True
Else
CheckDigit = False
End If
Else
CheckDigit = False
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|