VB code snippet - what does it do? - TechRepublic
General discussion
September 1, 2005 at 06:33 AM
stevef199

VB code snippet – what does it do?

by stevef199 . Updated 20 years, 10 months ago

***BEGIN CODE SNIPPET***************************
For i = 0 To 9
a = Mid(acc, i + 1, 1)
arr(i) = a
If (i < 9) Then m = arr(i) * (i + 1) s = s + m End If Next r = s Mod 10 If r <> arr(9) Then
MsgBox ” Wrong format “, vbCritical
Else

***END CODE SNIPPET******************************

What is this VB code supposed to be doing?

acc is a string that is 13 characters long;
here is a sample: 9999999999-99

Many thanks in advance,
Steve

This discussion is locked

All Comments