Need help with understanding some code

twiseman

New member
Joined
Nov 29, 2004
Messages
3
Programming Experience
Beginner
I recently found a code snippet, and I was wondering if someone could help me understand what it does a little better?

Public Sub num2txt3(ByVal no As Integer)
i = 0
num2txt1(Val(Mid(Trim(Str(no)), 1, 1)))
notxt2 = notxt + " Hundred"
no1 = Val(Mid(Trim(Str(no)), 2, 2))

If (Not Val(Mid(Trim(Str(no)), 2, 2)) = 0 And Len(no1) > 1) Then
num2txt2(Val(LCase(Mid(Trim(Str(no)), 2, 2))))
notxt2 = notxt2 + " And " + notxt1
End If
If (Not Val(Mid(Trim(Str(no)), 2, 2)) = 0 And Not Len(no1) = 1) Then
num2txt1(Val(LCase(Mid(Trim(Str(no)), 3, 3))))
notxt2 = notxt2 + " And " + notxt
End If

i = 0
End Sub
 
Back
Top